ci: fix cache

This commit is contained in:
H01001000
2022-12-02 17:27:49 +08:00
parent f6422933df
commit 87cd4e5146

View File

@@ -13,14 +13,22 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --immutable
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v3
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
key: ${{ runner.os }}-turbo-lint-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Check Formatting
@@ -34,7 +42,15 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-test:type-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --immutable
- name: Turbo Cache
id: turbo-cache
@@ -55,7 +71,15 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-test:unit-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --immutable
- name: Turbo Cache
id: turbo-cache