Skip to content

Commit

Permalink
Initial support for Cypress Cloud
Browse files Browse the repository at this point in the history
This should allow running tests in parallel to provide a faster testing
process. Also it may provide a better test debugging experience.

All setup is based on the example from the documentation:
https://github.com/cypress-io/github-action#split-install-and-tests
  • Loading branch information
kasperg committed Oct 23, 2023
1 parent dbd556e commit 3bb7230
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ jobs:
options: --user 1001
env:
TZ: Europe/Copenhagen
strategy:
# When one test fails, DO NOT cancel the other containers, because this
# will kill Cypress processes leaving Cypress Cloud hanging.
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# Run 3 copies of the current job in parallel
containers: [1, 2, 3]
steps:
- uses: actions/checkout@master
- name: Setup Node
Expand All @@ -28,9 +36,15 @@ jobs:
- name: Cypress run
uses: cypress-io/github-action@v6
with:
install: false
start: yarn start:storybook:test
wait-on: "http://localhost:57021"
browser: chrome
group: "Integration tests"
parallel: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload screenshots
uses: actions/upload-artifact@v3
if: failure()
Expand Down
3 changes: 2 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"retries": {
"runMode": 3,
"openMode": 0
}
},
"projectId": "4trcdv"
}

0 comments on commit 3bb7230

Please sign in to comment.