Skip to content

Commit

Permalink
fix: Cypress CI workflow now uses required Node version and dependenc…
Browse files Browse the repository at this point in the history
…ies cache
  • Loading branch information
travellingprog committed Oct 30, 2023
1 parent 21143c3 commit 94c553e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ jobs:
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: './web/.node-version'
- name: Restore node_modules for web
id: cache-web
uses: actions/cache@v3
with:
path: web/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
- name: Install web dependencies
if: steps.cache-web.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
working-directory: ./web
- name: Cypress run component tests
uses: cypress-io/github-action@v6
env:
Expand All @@ -38,6 +52,20 @@ jobs:
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: './web/.node-version'
- name: Restore node_modules for web
id: cache-web
uses: actions/cache@v3
with:
path: web/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
- name: Install web dependencies
if: steps.cache-web.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
working-directory: ./web
- name: Cypress run e2e tests
uses: cypress-io/github-action@v6
env:
Expand Down

0 comments on commit 94c553e

Please sign in to comment.