ci: fix cypress cache issue

This commit is contained in:
mutoe 2022-12-01 23:12:30 +08:00
parent 98d7f38a56
commit 5173b4a4dd
No known key found for this signature in database
GPG Key ID: 7197231B847AE2EE
1 changed files with 28 additions and 0 deletions

View File

@ -63,6 +63,20 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pnpm install run: pnpm install
- id: cypress-version
run: pnpm info cypress version
- name: Cache cypress binary
id: cache-cypress-binary
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: cypress-binary-${{ runner.os }}-${{ steps.cypress-version.outputs.stdout }}
- name: Install cypress binary
if: steps.cache-cypress-binary.outputs.cache-hit != 'true'
run: pnpm cypress install
- name: Unit test - name: Unit test
run: pnpm test:unit:ci run: pnpm test:unit:ci
@ -95,5 +109,19 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pnpm install run: pnpm install
- id: cypress-version
run: pnpm info cypress version
- name: Cache cypress binary
id: cache-cypress-binary
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: cypress-binary-${{ runner.os }}-${{ steps.cypress-version.outputs.stdout }}
- name: Install cypress binary
if: steps.cache-cypress-binary.outputs.cache-hit != 'true'
run: pnpm cypress install
- name: E2E test - name: E2E test
run: pnpm test:e2e:ci run: pnpm test:e2e:ci