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
|
||||
with:
|
||||
node-version: '14'
|
||||
- name: Find yarn cache location
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: JS package cache
|
||||
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
|
||||
cache: yarn
|
||||
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Run linters
|
||||
run: |
|
||||
|
@ -79,19 +70,10 @@ jobs:
|
|||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
- name: Find yarn cache location
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: JS package cache
|
||||
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
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install Node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Setup test database
|
||||
env:
|
||||
|
|
Loading…
Reference in a new issue