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@v7
The 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. Alternatively, Component Testing can be utilized by referencing the Component Testing section below.
To use Cypress Component Testing add component: true
name: Component tests
on: push
jobs:
cypress-run:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Cypress run
uses: cypress-io/github-action@v7
with:
component: true
See the example project component-tests and the example-component-test.yml workflow for more details.
Best practice:
Our examples specify using branch v7 which is the action's recommended major version:
- name: Cypress run
uses: cypress-io/github-action@v7
When using cypress-io/github-action@v7 from your workflow file, you will automatically use the latest tag from branch v7.
Alternatively, to mitigate unforeseen breaks, bind to a specific tag, for example:
- name: Cypress run
uses: cypress-io/github-action@v7.0.0
The changes associated with each tag are shown under GitHub's [releases](http
$ claude mcp add github-action \
-- python -m otcore.mcp_server <graph>