Skip to content

Commit

Permalink
ci: cache Cypress binary to fix tests on pr workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufkandemir committed Mar 12, 2024
1 parent 001ed89 commit 4b8d89b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@ jobs:
node-version: 20
cache: 'pnpm'

# We have to cache Cypress binary as well (https://on.cypress.io/not-installed-ci-error)
- name: Get Cypress version
id: cypress-version
run: |
# Can't use pnpm why, pnpm list, etc. as we haven't installed the dependencies yet
echo "CYPRESS_VERSION=$(pnpm cat-index cypress | jq -r '.version')" > $GITHUB_OUTPUT
- name: Cache Cypress binary
uses: actions/cache@v4
with:
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
path: ~/.cache/Cypress
key: cypress-cache-${{ steps.cypress-version.outputs.CYPRESS_VERSION }}
restore-keys: |
cypress-cache-
- name: Install dependencies
run: pnpm i

Expand Down

0 comments on commit 4b8d89b

Please sign in to comment.