Try yarn cache in github action
This commit is contained in:
parent
0d2ae56519
commit
ac6c58a8b1
1 changed files with 16 additions and 3 deletions
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
|
@ -20,6 +20,19 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- run: yarn install
|
||||
- run: yarn typecheck
|
||||
- run: yarn lint:all
|
||||
|
|
Loading…
Reference in a new issue