2024-01-03 15:14:09 -05:00
|
|
|
name: Cypress Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches: ['main', 'next']
|
|
|
|
pull_request:
|
|
|
|
branches: ['main', 'next']
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
cypress-run:
|
2024-12-28 11:51:19 +01:00
|
|
|
runs-on: act-runner-user
|
2024-01-03 15:14:09 -05:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false # https://github.com/cypress-io/github-action/issues/48
|
|
|
|
matrix:
|
|
|
|
containers: [1, 2] # Uses 2 parallel instances
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
cache: yarn
|
|
|
|
cache-dependency-path: |
|
|
|
|
yarn.lock
|
|
|
|
packages/app/yarn.lock
|
|
|
|
packages/core/yarn.lock
|
|
|
|
packages/docs/yarn.lock
|
|
|
|
node-version: 18
|
|
|
|
|
|
|
|
- name: Install
|
|
|
|
run: |
|
|
|
|
yarn install --frozen-lockfile
|
|
|
|
|
|
|
|
- name: Run Cypress Tests
|
|
|
|
uses: cypress-io/github-action@v6
|
|
|
|
with:
|
|
|
|
start: yarn dev
|
|
|
|
wait-on: 'http://localhost:8080'
|
|
|
|
record: true # Records to Cypress Cloud
|
|
|
|
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.CYPRESS_GITHUB_TOKEN }}
|