From acf2d643f9b6926f6abfdebc6ef102d0bd797b1b Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 14 Aug 2021 16:26:14 +0200 Subject: [PATCH 1/4] CI: Remove Node 15 from matrix Node 15 is EOL since 01 June 2021 See https://endoflife.date/nodejs Signed-off-by: David Mehren --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 791b29d81..339b10394 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x, 14.x, 15.x, 16.x] + node-version: [12.x, 14.x, 16.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} @@ -63,7 +63,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x, 14.x, 15.x, 16.x] + node-version: [12.x, 14.x, 16.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} From 313ed46888398b1d1b11f87e0551bf2f78007701 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 14 Aug 2021 16:51:35 +0200 Subject: [PATCH 2/4] CI: Migrate to integrated dependency cache Since https://github.com/actions/setup-node/releases/tag/v2.2.0 the setup-node action supports caching dependencies natively. We can therefore simplify our CI config. Signed-off-by: David Mehren --- .github/workflows/node.js.yml | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 339b10394..318d1bab4 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -22,16 +22,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: 14 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: yarn - run: yarn --frozen-lockfile --prefer-offline - run: ${{matrix.command}} dynamic-tests: @@ -46,16 +37,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: yarn - run: yarn --frozen-lockfile --prefer-offline - run: yarn run mocha-suite production-build: @@ -70,16 +52,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: yarn - run: yarn --frozen-lockfile --prefer-offline - run: yarn run build - uses: actions/upload-artifact@v2 From b9a0cb6150017b988a38fd72faad74d1978037fd Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 14 Aug 2021 16:52:29 +0200 Subject: [PATCH 3/4] CI: Node Node 16 for single tasks Signed-off-by: David Mehren --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 318d1bab4..e9d3eb500 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -18,10 +18,10 @@ jobs: - sudo apt install -y jq && yarn run jsonlint steps: - uses: actions/checkout@v2 - - name: Use Node.js 14 + - name: Use Node.js 16 uses: actions/setup-node@v2 with: - node-version: 14 + node-version: 16 cache: yarn - run: yarn --frozen-lockfile --prefer-offline - run: ${{matrix.command}} @@ -56,7 +56,7 @@ jobs: - run: yarn --frozen-lockfile --prefer-offline - run: yarn run build - uses: actions/upload-artifact@v2 - if: github.ref == 'refs/heads/master' && matrix.node-version == '14.x' + if: github.ref == 'refs/heads/master' && matrix.node-version == '16.x' with: name: Prebuild with Node.js ${{ matrix.node-version }} path: | From 0e9fc1f05df319ca9341c3337b9279e462e3f080 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 14 Aug 2021 16:53:39 +0200 Subject: [PATCH 4/4] CI: Use short Node versions https://github.com/actions/setup-node#supported-version-syntax documents only the short versions, without `.x`, so we shall use them. Signed-off-by: David Mehren --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e9d3eb500..d75a1a459 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x, 14.x, 16.x] + node-version: [12, 14, 16] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x, 14.x, 16.x] + node-version: [12, 14, 16] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} @@ -56,7 +56,7 @@ jobs: - run: yarn --frozen-lockfile --prefer-offline - run: yarn run build - uses: actions/upload-artifact@v2 - if: github.ref == 'refs/heads/master' && matrix.node-version == '16.x' + if: github.ref == 'refs/heads/master' && matrix.node-version == '16' with: name: Prebuild with Node.js ${{ matrix.node-version }} path: |