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 tests2on: push3jobs:4 cypress-run:5 runs-on: ubuntu-22.046 steps:7 - name: Checkout8 uses: actions/checkout@v49 - name: Install Replay Chromium10 run: npx replayio install11 - name: Cypress run12 uses: cypress-io/github-action@v613 with:14 browser: replay-chromium15 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.