From 313ed46888398b1d1b11f87e0551bf2f78007701 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 14 Aug 2021 16:51:35 +0200 Subject: [PATCH] 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