Example running Cypress tests inside GitHub Action
Uses cypress-io/github-action to run Cypress end-to-end tests. Runs recorded at Cypress Dashboard
.github/workflows | Status | Description |
---|---|---|
artifacts.yml | Stores generated run video and any screenshots using CI artifacts | |
basic.yml | Basic tests example | |
chrome.yml | Runs tests using Chrome browser, rather than Electron | |
custom-container.yml | Runs tests using custom Docker image | |
main.yml | Runs tests on different versions of Node | |
merge.yml | Shows how to set custom commit message for pull requests workflows | |
separate-install.yml | Workflow where install and tests are in separate steps | |
separate-jobs.yml | Install dependencies and build the app in one job, test in another | |
serve.yml | Shows workflow with server start command and a separate config file | |
subfolder.yml | Installing and testing from a subfolder | |
tags.yml | Recorded runs with tags using different Node versions | |
timeouts.yml | Stops the job if it runs over the time limit | |
ubuntu.yml | Runs E2E tests on Ubuntu 16 and Ubuntu 18 |
Example image of a test run across Node v12 and v14 recorded on Cypress Dashboard from the .github/workflows/main.yml workflow
Note: see cypress.json where Cypress is configured to use the system Node, rather than the bundled Node version.
Example image showing how to download the test run videos from the action .github/workflows/artifacts.yml
For more information see cypress-io/github-action and read Drastically Simplify Testing on CI with Cypress GitHub Action blog post.