Orchestrated runs
How to set up failed test reruns for Orchestration on GitHub Actions
Prerequisites
Orchestration Setup —
@currents/playwrighton its latest version.CURRENTS_RECORD_KEY,CURRENTS_PROJECT_ID, andCURRENTS_API_KEYconfigured in GitHub Actions secretsplaywright-last-failed@v2 — exposes
extra-discovery-flagsfor the discover step
Step-by-step
Install @currents/cmd
The playwright-last-failed action depends on @currents/cmd. Pin it in the repository for reproducible installs:
npm i -D @currents/cmdSet CURRENTS_API_KEY
Create an API key in the Currents Dashboard (see Authentication) in addition to the Record Key. Add it as a GitHub Actions secret.
env:
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
CURRENTS_API_KEY: ${{ secrets.CURRENTS_API_KEY }}Add the Playwright Last Failed step
- name: Playwright Last Failed action
id: last-failed-action
uses: currents-dev/playwright-last-failed@v2
with:
or8n: true
pw-output-dir: basic/test-resultsWhen or8n: true, the action sets extra-discovery-flags for pwc-p discover (for example --last-failed on reruns).
Discover, then run
Run discovery once per job (or in a dedicated setup job that shares the test list artifact), then orchestrate with pwc-p run:
On the first run, extra-discovery-flags is empty and discovery records the full suite. On a workflow rerun, it includes --last-failed so only previously failed tests are orchestrated.
Full example
The full workflow is included above. For V1, see reruns-or8n.yml.
Last updated
Was this helpful?