Running cypress tests in parallel with GitHub Action and Currents dashboard
Currents dashboard allows running cypress tests in parallel using multiple containers within your GitHub Actions workflow.
By using GitHub Actions matrix execution strategy, you can create multiple containers that will run your cypress tests in parallel.
Each container will receive a unique set of tests to run, so that your cypress tests will run faster and you can receive faster feedback from your browser test suite.
Currents orchestrates the tests between multiple containers, applying intelligent optimizations to reduce the overall runtime of your workflow, records screenshots and videos for later troubleshooting.
Cypress Tests Parallelization with Github Actions
Please take a look at the example repository that showcases running cypress tests in parallel using GitHub Actions.
- runs 3 containers with cypress tests in parallel
- uses Custom Test Command to run
cypress-cloudfor recording test results and parallelization with Currents.dev
- Note: set the
currents.config.js(you can obtain the project id from Currents.dev in Project Settings)
- Note: install
- Note: use CLI arguments to customize your cypress runs, e.g.:
cypress-cloud run --parallel --record --key <your currents.dev key> --group groupA
- Note: create an organization, get your record key on Currents.dev and set GH secret variable
Here's an example of how the demo workflow appears in Currents dashboard
Running Cypress tests in parallel - Currents dashboard
Running Cypress tests using GitHub Actions can generate confusing git information. For example, instead of the last commit message (or pull request title), one can see something like:
Merge de7282540ac30ee4e32a0b1fede4f6391b4cc321 into fa58941d8a807b83ec5a3e5bfb83418ce12173c7
Also, the branch name becomes
refs/pull/12/mergeinstead of the expected branch name. Why is that happening?
It changes the behaviour of
@actions/checkout- it creates a new merge commit, which is created from merging the base to the head.
- it performs
- it sets the git
- it sets the commit SHA to an arbitrary value that is different from the commit that triggered the workflow
In order to change the default behaviour and checkout the triggering commit, use the following