MCPcopy Index your code
hub / github.com/cypress-io/github-action

github.com/cypress-io/github-action @v7.4.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v7.4.1 ↗ · + Follow
52 symbols 168 edges 79 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

cypress-io/github-action [![Action status][ci-badge]][ci-workflow] [![cypress][cloud-badge]][cloud-project] [![renovate-app badge][renovate-badge]][renovate-bot]

Cypress based cypress-io/github-action runs End-to-End or Component tests in GitHub Actions Continuous Integration (CI) workflows, optionally recording to Cypress Cloud

Introduction

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

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

End-to-End 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.

End-to-End Testing

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

End-to-End example

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.

Component Testing

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

Component Testing example

See the example project component-tests and the example-component-test.yml workflow for more details.

Action version

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

Core symbols most depended-on inside this repo

log
called by 22
examples/quiet/cypress.config.js
getInputBool
called by 15
index.js
execCommand
called by 5
index.js
useYarn
called by 4
index.js
usePnpm
called by 4
index.js
isCypressBinarySkipped
called by 3
index.js
isWindows
called by 2
index.js
lockHash
called by 2
index.js

Shape

Function 52

Languages

TypeScript100%

Modules by API surface

index.js36 symbols
examples/component-tests/src/components/Stepper.jsx3 symbols
src/ping.js2 symbols
examples/wait-on-vite/counter.js2 symbols
examples/quiet/cypress.config.js2 symbols
examples/browser/cypress.config.js2 symbols
examples/nextjs/src/app/layout.js1 symbols
examples/expose/cypress.config.js1 symbols
examples/env/cypress.config.js1 symbols
examples/config/cypress.config-alternate.js1 symbols
examples/component-tests/src/App.jsx1 symbols

For agents

$ claude mcp add github-action \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact