For the complete documentation index, see llms.txt. This page is also available as Markdown.

Orchestrated runs

How to set up failed test reruns for Orchestration on GitHub Actions

Currents Orchestration assigns tests to all available CI runners, so Re-run all jobs should be used instead of re-running only failed jobs. Read more at Orchestrated runs.

Prerequisites

  • Orchestration Setup@currents/playwright on its latest version.

  • CURRENTS_RECORD_KEY, CURRENTS_PROJECT_ID, and CURRENTS_API_KEY configured in GitHub Actions secrets

  • playwright-last-failed@v2 — exposes extra-discovery-flags for 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/cmd

Set 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-results

When 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

For a workflow with a custom CI build ID, see Custom CI Build ID for Reruns.

The full workflow is included above. For V1, see reruns-or8n.yml.

Last updated

Was this helpful?