Re-run Only Failed Tests
How to set up failed test reruns on GitHub Actions
Last updated
Was this helpful?
How to set up failed test reruns on GitHub Actions
When a workflow fails in GitHub Actions, the failed jobs can be re-run. However, Playwright needs extra setup to rerun only the failed tests.
For GitHub Actions, Currents provides the Last Failed GitHub Action to simplify reruns with Playwright sharding or Currents Orchestration.
The playwright-last-failed action uses @currents/cmd as a dependency. To control which version of @currents/cmd is used, install it as a dev dependency in package.json and use npm ci (or your package manager's equivalent frozen lockfile install) in GitHub Actions. Without this, the action installs @currents/cmd globally from npm, which may pull a different version than what's pinned in your lockfile.
Select the guide that matches your setup:
Sharded runs — fixed shard count and native Playwright --shard parallelism
Orchestrated runs — pwc-p discover and pwc-p run
Custom CI Build ID for Reruns — for sharded or orchestrated runs with a non-default CI build ID
Last updated
Was this helpful?
Was this helpful?