GitHub Action for running Cypress end-to-end & component tests
GitHub Action for running Cypress end-to-end & component tests
Cypress based
cypress-io/github-actionruns End-to-End or Component tests in GitHub Actions Continuous Integration (CI) workflows, optionally recording to Cypress Cloud
In addition to running Cypress tests, the action includes dependency installation, caching and more:
| Function | Benefits |
|---|---|
| Single-line call | Simplified use by installing dependencies and running Cypress in one line of workflow code |
| Build app, Start server and Wait for server options | Convenience of app, server and test coordination |
| cypress run CLI type options | Improved readability with vertically listed workflow options |
| Dependency installation based on npm, pnpm and Yarn Classic lock files | Reduced command complexity |
| Caching of Cypress binary and dependencies for npm and Yarn Classic installations | Reduced download bandwidth requirements |
| Job summary | Fast access to results overview |
| Docker compatibility | Improved independence from GitHub-hosted runner image version changes. Fixed Docker environments can be used. |
| Recording to Cypress Cloud compatibility including parallel execution | Improved interpretation of test results through Cypress Cloud |
| Live examples | Speeds up introduction and troubleshooting |
| Yarn Modern usage and cache examples | Extends usage beyond Yarn Classic |
| pnpm cache examples | Reduced download bandwidth requirements for pnpm |
| Debug enabled | Improved workflow troubleshooting |
| Ping utility | Improved server reachability troubleshooting |
The following examples demonstrate the actions' functions.
Examples contained in this repository, based on current Cypress versions, can be found in the examples directory.
Live examples, such as example-basic.yml are shown together with a status badge. Click on the status badge to read the source code of the workflow, for example Note: this package assumes that cypress is declared as a development dependency in the package.json file. The cypress npm module is required to run Cypress via its Module API.
name: End-to-end tests
on: push
jobs:
cypress-run:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v7
# Install dependencies with caching
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v7The workflow file example-basic.yml shows how Cypress runs on GH Actions using Ubuntu (22.04 and 24.04), Windows, and macOS without additional OS dependencies necessary.
This workflow uses the default test type of End-to-End (E2E) Testing. Alterna
No open issues yet, or sync has not completed.