| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This action supports re-running only the Playwright tests that failed when GitHub Actions runs “re-run failed jobs” (or similar retries). It works together with Currents and the @currents/cmd CLI.
Full setup, sharding, orchestration, and CI build ID details: Re-run only failed tests (GitHub Actions) on docs.currents.dev. For background on why re-runs need extra configuration, see the guide Re-run only failed tests.
The step output is passed into the Playwright command—for example npx playwright test … ${{ steps.<id>.outputs.extra-pw-flags }}—so only failed tests run on retry.
The action runs on Node 24 and installs @currents/cmd globally (npm install -g @currents/cmd). It then behaves in one of two ways:
Suited to workflows that report runs to Currents with a record key (typical Playwright reporter + sharding flow).
Authentication and targeting use the Currents record key (input key or CURRENTS_RECORD_KEY). Optional id, path, matrix inputs, and pw-output-dir tune what is cached.
Suited to workflows that rely on Currents Orchestration (or otherwise need the CLI to resolve failures via the API). In this mode the post-cache step is skipped.
On re-run attempts (GITHUB_RUN_ATTEMPT > 1), the main step runs npx currents api get-run to fetch the previous run and, when successful, sets extra-discovery-flags to --last-failed. The workflow should define CURRENTS_API_KEY, CURRENTS_PROJECT_ID (and related environment variables as in the docs), and set or8n: true (or use-api: true) as shown in the orchestration section of the documentation.
| Name | Description |
|---|---|
| extra-pw-flags | Flags to append to the Playwright test command. |
| extra-discovery-flags | Flags to append to the pwc-p discover command. |
If restoration fails, the output may be empty; the workflow can still run tests normally.
*In cache mode a record key (input or environment) is required for meaningful cache reads/writes.
- name: Playwright Last Failed
id: last-failed
uses: currents-dev/playwright-last-failed@v1
env:
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
with:
pw-output-dir: test-results
matrix-index: ${{ matrix.shard }}
matrix-total: ${{ strategy.job-total }}
- name: Run Playwright
run: npx playwright test ${{ steps.last-failed.outputs.extra-pw-flags }}For orchestration (or8n: true), environment variables, custom CURRENTS_CI_BUILD_ID, and copypaste workflows, see Re-run only failed tests (GitHub Actions).
Input/output definitions are in action.yml.
This action is implemented in TypeScript (src/index.ts, src/post.ts). After changing sources, run npm run all to format, lint, test, and rebuild dist/ before committing.
| Back | FazBrowse Home | New Git URL |