Fallback to restore previous node_modules cache in github action

This commit is contained in:
Hammad Jutt
2020-07-26 14:28:13 -06:00
parent 71c70ac4f0
commit 25d89a52d6
2 changed files with 21 additions and 7 deletions

View File

@@ -22,17 +22,30 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
key: nodeModules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
nodeModules-
- name: Install packages
run: yarn --frozen-lockfile
- name: Linting
run: yarn lint
- name: Typechecking
run: yarn typecheck
- name: Testing
run: yarn test
env:
CI: true
- name: Linting
run: yarn lint
env:
CI: true
- name: Typechecking
run: yarn typecheck
env:
CI: true
- name: Testing
run: yarn test --ci --coverage
env:
CI: true