GitHub actions with Cypress

These instructions assume that you have already set up your Cypress project.

This example uses Cypress GitHub Action that provides dependency installation, built-in caching, and multiple options for advanced workflow configuration. For recording your test, the replay-chromium browser needs to be passed as a browser.

.github/workflows/e2e.yml
1name: End-to-end tests
2on: push
3jobs:
4 cypress-run:
5 runs-on: ubuntu-22.04
6 steps:
7 - name: Checkout
8 uses: actions/checkout@v4
9 - name: Install Replay Chromium
10 run: npx replayio install
11 - name: Cypress run
12 uses: cypress-io/github-action@v6
13 with:
14 browser: replay-chromium
15 env:
16 REPLAY_API_KEY: ${{ secrets.REPLAY_API_KEY }}

Running with Replay browser will create your replays. These are stored locally on your CI and need to be uploaded to Replay app once the test run is finished.

Learn more

Upload strategies

There are different strategies for uploading your replays such as uploading only on test flakes or failures.

GitHub upload action

GitHub upload action takes care of uploading your recordings during your CI test runs on GitHub. It enables you to filter the recordings you upload to Replay App.