CI Workflows

Upload strategies

When you run tests and create recordings, they are stored locally. You can opt to upload them automatically or define your own uploading strategy. All uploaded recordings become accessible in the Replay App.


While uploading just failed test is good for saving resources, our recommendation is to upload both failed and passed tests so that you can compare them. This can be really useful for debugging purposes.

Upload failed tests only

By default, all test replays are uploaded no matter the result. If you want upload only the failed recordings, you can define the step to do so using filter property:

Using GitHub Action

.github/workflows/e2e.yml
1name: Replay tests
2on: [push, pull_request]
3jobs:
4 cypress-run:
5 runs-on: ubuntu-22.04
6 steps:
7 - name: Checkout
8 uses: actions/checkout@v4
9 - name: Install dependencies
10 run: npm ci
11 - name: Run Playwright tests with Replay Browser
12 run: npx playwright test --project replay-chromium --reporter=@replayio/playwright/reporter,line
13 - name: Upload replays
14 if: ${{ always() }}
15 uses: replayio/action-upload@v0.5.1
16 with:
17 api-key: ${{ secrets.REPLAY_API_KEY }}
18 filter: ${{ 'function($v) { $v.metadata.test.result = "failed" }' }}