The openapi/storybook/embeds workflows pinned pnpm 8 and cypress pinned pnpm 6 via action-setup@v2. The repo's lockfile is lockfileVersion 9.0 (written by the pinned packageManager [email protected].0), which pnpm 8/6 cannot read — it ignored the lockfile and --frozen-lockfile failed with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH. Drop the explicit version and let action-setup@v4 resolve pnpm from the packageManager field, matching the already-working publish-mcp / publish-course-app workflows.
47 lines
2.0 KiB
YAML
47 lines
2.0 KiB
YAML
name: Cypress Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- cypress # Only trigger on update to this branch
|
|
|
|
jobs:
|
|
cypress-run:
|
|
runs-on: ubuntu-latest
|
|
# Runs tests in parallel with matrix strategy https://docs.cypress.io/guides/guides/parallelization
|
|
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
|
|
# Also see warning here https://github.com/cypress-io/github-action#parallel
|
|
strategy:
|
|
fail-fast: false # https://github.com/cypress-io/github-action/issues/48
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
# Only install what we need to run the client in-action and tests against it
|
|
# format: `--filter <packagename>...`
|
|
run_install: |
|
|
- args: []
|
|
- name: Cypress run
|
|
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
|
|
uses: cypress-io/github-action@v6
|
|
with:
|
|
install: false
|
|
# Starts web server for E2E tests - replace with your own server invocation
|
|
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server
|
|
command: pnpm ci
|
|
start: pnpm --dir apps/dashboard/ ci
|
|
wait-on: 'http://localhost:4173' # Waits for above
|
|
# Records to Cypress Cloud
|
|
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
|
|
record: true
|
|
parallel: true # Runs test in parallel using settings above
|
|
env:
|
|
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
|
|
# in GitHub repo → Settings → Secrets → Actions
|
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|