test: fix test workflow

This commit is contained in:
an-lee
2024-03-21 16:24:32 +08:00
parent 3000a63ca8
commit ee3c16ed98
5 changed files with 5 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ jobs:
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
key: ubuntu-latest-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install

View File

@@ -16,7 +16,7 @@ jobs:
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
key: macos-12-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install

View File

@@ -16,7 +16,7 @@ jobs:
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
key: macos-14-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install

View File

@@ -16,7 +16,7 @@ jobs:
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
key: windows-latest-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install

View File

@@ -28,7 +28,7 @@ jobs:
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "**/node_modules"
key: ${{ github.event.inputs.os }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ matrix.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install