Use yarn cache dir for correct caching
This commit is contained in:
parent
e8aa9d81c2
commit
c2908e12e1
50
.github/workflows/validate-js.yml
vendored
50
.github/workflows/validate-js.yml
vendored
@ -24,14 +24,18 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- 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: |
|
||||
node_modules
|
||||
example/node_modules
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install modules
|
||||
run: yarn
|
||||
- name: Install modules (example/)
|
||||
@ -42,18 +46,18 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- 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: |
|
||||
node_modules
|
||||
example/node_modules
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
# - name: Install modules
|
||||
# run: yarn
|
||||
# - name: Install modules (example/)
|
||||
# run: yarn example
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Run TypeScript
|
||||
run: yarn typescript
|
||||
lint:
|
||||
@ -62,17 +66,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- 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: |
|
||||
node_modules
|
||||
example/node_modules
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
# - name: Install modules
|
||||
# run: yarn
|
||||
# - name: Install modules (example/)
|
||||
# run: yarn example
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Run ESLint
|
||||
run: yarn lint-ci
|
||||
|
Loading…
Reference in New Issue
Block a user