Skip to content

Commit

Permalink
keep it simple
Browse files Browse the repository at this point in the history
  • Loading branch information
neilboyd committed Feb 20, 2025
1 parent a940053 commit ecbe824
Showing 1 changed file with 5 additions and 36 deletions.
41 changes: 5 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
cypress-run:
runs-on: ubuntu-24.04
timeout-minutes: 5
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -32,45 +32,14 @@ jobs:
- name: Run Cypress tests on build server
uses: cypress-io/github-action@v6
with:
wait-on: "http://localhost:4000"
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
- name: Run Cypress tests on Cypress Cloud
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
wait-on: "http://localhost:4000"
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 }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ecbe824

Please sign in to comment.