From 544a29d2e26cdd3c08c18d5041f8d1b2c9b58061 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Sun, 3 Sep 2023 02:38:22 +0000 Subject: [PATCH] ci: read nodejs version from .nvmrc --- .github/workflows/artifact-tests.yml | 8 ++++---- .github/workflows/audit.yml | 4 ++-- .github/workflows/cache-tests.yml | 6 +++--- .github/workflows/cache-windows-test.yml | 4 ++-- .github/workflows/releases.yml | 4 ++-- .github/workflows/unit-tests.yml | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/artifact-tests.yml b/.github/workflows/artifact-tests.yml index a74db480..6351020c 100644 --- a/.github/workflows/artifact-tests.yml +++ b/.github/workflows/artifact-tests.yml @@ -24,10 +24,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set Node.js 20.x + - name: Set Node.js version uses: actions/setup-node@v4 with: - node-version: 20.x + node-version-file: .nvmrc # Need root node_modules because certain npm packages like jest are configured for the entire repository and it won't be possible # without these to just compile the artifacts package @@ -79,10 +79,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set Node.js 20.x + - name: Set Node.js version uses: actions/setup-node@v4 with: - node-version: 20.x + node-version-file: .nvmrc # Need root node_modules because certain npm packages like jest are configured for the entire repository and it won't be possible # without these to just compile the artifacts package diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index a8f5be4a..a8a7bc7a 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -20,10 +20,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set Node.js 20.x + - name: Set Node.js version uses: actions/setup-node@v4 with: - node-version: 20.x + node-version-file: .nvmrc - name: npm install run: npm install diff --git a/.github/workflows/cache-tests.yml b/.github/workflows/cache-tests.yml index dfe89f68..05c0e577 100644 --- a/.github/workflows/cache-tests.yml +++ b/.github/workflows/cache-tests.yml @@ -24,10 +24,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set Node.js 20.x + - name: Set Node.js version uses: actions/setup-node@v4 with: - node-version: 20.x + node-version-file: .nvmrc # In order to save & restore cache from a shell script, certain env variables need to be set that are only available in the # node context. This runs a local action that gets and sets the necessary env variables that are needed @@ -44,7 +44,7 @@ jobs: npm ci npm run tsc working-directory: packages/cache - + - name: Generate files in working directory shell: bash run: packages/cache/__tests__/create-cache-files.sh ${{ runner.os }} test-cache diff --git a/.github/workflows/cache-windows-test.yml b/.github/workflows/cache-windows-test.yml index 75792fc0..e0a87d1c 100644 --- a/.github/workflows/cache-windows-test.yml +++ b/.github/workflows/cache-windows-test.yml @@ -23,10 +23,10 @@ jobs: run: | rm "C:\Program Files\Git\usr\bin\tar.exe" - - name: Set Node.js 20.x + - name: Set Node.js version uses: actions/setup-node@v1 with: - node-version: 20.x + node-version-file: .nvmrc # In order to save & restore cache from a shell script, certain env variables need to be set that are only available in the # node context. This runs a local action that gets and sets the necessary env variables that are needed diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 3f69cb63..0e428af2 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -18,10 +18,10 @@ jobs: - name: verify package exists run: ls packages/${{ github.event.inputs.package }} - - name: Set Node.js 20.x + - name: Set Node.js version uses: actions/setup-node@v4 with: - node-version: 20.x + node-version-file: .nvmrc - name: npm install run: npm install diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 952fa6b2..7b39757d 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -25,10 +25,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set Node.js 20.x + - name: Set Node.js version uses: actions/setup-node@v4 with: - node-version: 20.x + node-version-file: .nvmrc - name: npm install run: npm install