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:
33
.github/workflows/node.js.yml
vendored
33
.github/workflows/node.js.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user