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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- 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
|
- uses: actions/cache@v2
|
||||||
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: |
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
node_modules
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
example/node_modules
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- name: Install modules
|
- name: Install modules
|
||||||
run: yarn
|
run: yarn
|
||||||
- name: Install modules (example/)
|
- name: Install modules (example/)
|
||||||
@ -42,18 +46,18 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- 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
|
- uses: actions/cache@v2
|
||||||
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: |
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
node_modules
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
example/node_modules
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-yarn-
|
||||||
# - name: Install modules
|
|
||||||
# run: yarn
|
|
||||||
# - name: Install modules (example/)
|
|
||||||
# run: yarn example
|
|
||||||
- name: Run TypeScript
|
- name: Run TypeScript
|
||||||
run: yarn typescript
|
run: yarn typescript
|
||||||
lint:
|
lint:
|
||||||
@ -62,17 +66,17 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- 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
|
- uses: actions/cache@v2
|
||||||
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: |
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
node_modules
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
example/node_modules
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-yarn-
|
||||||
# - name: Install modules
|
|
||||||
# run: yarn
|
|
||||||
# - name: Install modules (example/)
|
|
||||||
# run: yarn example
|
|
||||||
- name: Run ESLint
|
- name: Run ESLint
|
||||||
run: yarn lint-ci
|
run: yarn lint-ci
|
||||||
|
Loading…
Reference in New Issue
Block a user