ci: use builtin cache for node modules
This is around 20s faster (10s when retrieved the cache and installing node modules, and 10s when saving the cache).
This commit is contained in:
parent
d83c036ef1
commit
21efece09e
1 changed files with 8 additions and 26 deletions
34
.github/workflows/ci.yml
vendored
34
.github/workflows/ci.yml
vendored
|
@ -22,19 +22,10 @@ jobs:
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
- name: Find yarn cache location
|
cache: yarn
|
||||||
id: yarn-cache
|
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
- name: Install node modules
|
||||||
- name: JS package cache
|
run: yarn install --frozen-lockfile
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yarn install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Run linters
|
- name: Run linters
|
||||||
run: |
|
run: |
|
||||||
|
@ -79,19 +70,10 @@ jobs:
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
- name: Find yarn cache location
|
cache: 'yarn'
|
||||||
id: yarn-cache
|
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
- name: Install Node modules
|
||||||
- name: JS package cache
|
run: yarn install --frozen-lockfile
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yarn install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Setup test database
|
- name: Setup test database
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Add table
Reference in a new issue