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 <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-08-14 16:51:35 +02:00
parent acf2d643f9
commit 313ed46888
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -22,16 +22,7 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 14 node-version: 14
- name: Get yarn cache directory path cache: yarn
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-
- run: yarn --frozen-lockfile --prefer-offline - run: yarn --frozen-lockfile --prefer-offline
- run: ${{matrix.command}} - run: ${{matrix.command}}
dynamic-tests: dynamic-tests:
@ -46,16 +37,7 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path cache: yarn
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-
- run: yarn --frozen-lockfile --prefer-offline - run: yarn --frozen-lockfile --prefer-offline
- run: yarn run mocha-suite - run: yarn run mocha-suite
production-build: production-build:
@ -70,16 +52,7 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path cache: yarn
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-
- run: yarn --frozen-lockfile --prefer-offline - run: yarn --frozen-lockfile --prefer-offline
- run: yarn run build - run: yarn run build
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2