Skip to content

Add GH workflow

Add GH workflow #1

name: Cypress Tests
on: [push, pull_request]
jobs:
cypress-run:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false # https://github.com/cypress-io/github-action/issues/48
matrix:
browser: [chrome, firefox]
containers: [1, 2] # Uses 2 parallel instances
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress run
uses: cypress-io/github-action@v6
with:
build: npm run build
start: npm run dev
wait-on: 'http://localhost:5173/' # Waits for above
wait-on-timeout: 120 # Waits for above
record: true
parallel: true # Runs test in parallel using settings above
spec: cypress/e2e/participant/**/* # Runs tests in this folder
env:
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 }}