- reports every run of your suite on a push to the headline branch and on pull requests
- runs the tests Peeps asks for when you start a run from Peeps
- hosts the job Peeps works in when it fixes a test or writes a new one
Copy it from Peeps
The project’s Repository settings page shows the workflow already filled in for your project: your headline branch, test root and Playwright config. Use that copy rather than the examples below.- GitHub
- GitLab
Under Workflow to install, click Copy workflow and commit it as
.github/workflows/peeps.yml. If you changed Workflow file in the project’s settings, use that name instead.TypeScript Playwright on GitHub Actions
This is the workflow for a suite at the repository root, withmain as the headline branch:
.github/workflows/peeps.yml
workflow_dispatchwithmode,sessionIdandrefis how Peeps starts a run, a fix or a new test. Keep the three inputs as they are.pushandpull_requestmake your own pushes and pull requests report their runs. Thepushbranch is your headline branch.id-token: writelets the job ask GitHub for the identity token it shows Peeps. No Peeps secret is needed.contents: readis all the job itself needs: when Peeps pushes a fix, it uses its own token for that one push.- The job’s
nameincludes the mode and session, so Peeps can find the job it started. Keep it as it is. actions/checkoutatinputs.ref || github.refchecks out the branch Peeps asked for.
Python (pytest-playwright) on GitHub Actions
For a pytest-playwright suite at the repository root:.github/workflows/peeps.yml
--tracing, --screenshot and --video options decide what’s in it.
A project runs one workflow, in one language. If your repository has both TypeScript and Python tests, the page offers the TypeScript workflow and says that it runs the TypeScript tests only. To run both, connect each suite to its own project, with its own test root and its own Workflow file.
GitLab CI/CD
GitLab has nouses:, so the job fetches the action and runs it with Node:
.gitlab-ci.yml
variables: block when your project needs one, such as for a test root or a Playwright config. For a Python suite it’s a different job, with a Python image and pip.
Common setups
Tests in a subdirectory. Set the project’s test root and the copied workflow points the action at it. By hand, addworking-directory under the action’s with:. config is relative to it:
main. The copied workflow’s push filter names your headline branch. If you change the headline branch later, change the filter to match. On GitLab, the job’s last rule runs on your default branch; change it to $CI_COMMIT_BRANCH == "develop", with your headline branch’s name. A push to another branch still reports its run, but only the headline branch’s tests become the project’s test cases.
Pull requests from forks. GitHub never gives a workflow triggered by a fork’s pull request an identity token, so the job can’t authenticate to Peeps and fails. If you take contributions from forks, skip the job for them:
inventory mode needs no session, so you can refresh the list of tests from the command line. Run it on your headline branch, adding --ref <branch> if that isn’t your default branch:
Action inputs
On GitLab the same settings are variables:
PEEPS_WORKING_DIRECTORY, PEEPS_PLAYWRIGHT_CONFIG and PEEPS_FRAMEWORK. Peeps sets PEEPS_MODE and PEEPS_SESSION_ID itself when it starts a pipeline.
PEEPS_API_URL is the address of Peeps the job reports to, https://app.peepsai.com by default. Leave it unset unless Peeps support gives you another address; the copy on the Repository page includes it when it’s needed.
Modes
ci is the default and means report. Peeps names the mode on every run it starts.
A report run on your default branch also refreshes the list of tests, because it’s the freshest list there is. That list becomes the project’s tests when your default branch is also your headline branch.