start #41
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cypress Tests | |
on: | |
push: | |
branches: | |
- main | |
- cypress-cloud | |
workflow_dispatch: | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: npm install | |
run: npm install | |
- name: Start server for tests | |
run: bundle exec jekyll serve --detach | |
- name: Run Cypress tests on build server | |
uses: cypress-io/github-action@v6 | |
with: | |
config: baseUrl=http://localhost:4000 | |
cypress-run-cloud: | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 5 | |
# 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 | |
matrix: | |
containers: [1, 2] # Uses 2 parallel instances | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: npm install | |
run: npm install | |
- name: Cypress run | |
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action | |
uses: cypress-io/github-action@v6 | |
with: | |
# Starts web server for E2E tests - replace with your own server invocation | |
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server | |
start: bundle exec jekyll serve --detach | |
wait-on: 'http://localhost:3000' # 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 }} |