Report from GitHub Actions
Use this guide after adding the reporter to your Playwright configuration.
-
In your GitHub repository, open Settings → Secrets and variables → Actions. Add a repository secret named
TESTPERCH_API_KEYwith your project’s reporter key. -
Pass the secret to the step that already launches Playwright. This example uses pnpm. Keep your existing install, browser setup, and test command.
- name: Run Playwrightenv:TESTPERCH_API_KEY: ${{ secrets.TESTPERCH_API_KEY }}run: pnpm exec playwright test -
Trigger the workflow on a branch with access to the secret. Open Runs in TestPerch and match the branch, build, and attempt to the GitHub Actions run. The reporter reads this metadata from GitHub automatically.
If your workflow shards Playwright, make the key available to each shard and keep the existing --shard arguments. Playwright supplies the shard position to the reporter.
For pull requests from forks, GitHub normally withholds repository secrets. With the conditional reporter configuration from the tutorial, Playwright still runs, and that job skips reporting to TestPerch.
To display a summary back on the pull request, connect this project’s GitHub repository.