Authentication
All of the methods below use an API key to authenticate. Generate one under Settings → API keys.GitHub Actions
Use our dispatch-action if you are using GitHub Actions for CI/CD.v1 reference receives backwards-compatible fixes while keeping breaking
major releases opt-in. You can instead pin an exact release such as v1.0.0.
Use the environment-variables input to set environment variables for the test
run, one per line in NAME: value format. These override the environment’s
configured variables. The URL of the build under test is passed to tests as the
BUILD_URL environment variable.
Set group and on-conflict in the concurrency input to control what happens
when the group already has an active run. For preview deployments, a group such
as preview/acme/web@${{ github.head_ref }} with cancel lets a new push
supersede the previous run for that branch. For production, use an
environment/repository group with wait to prevent deployments from testing
concurrently. See Concurrency.
The
build-url input is deprecated. It is sent to tests as the BUILD_URL
environment variable, so set BUILD_URL via environment-variables instead.Vercel deployments
For Vercel deployments, trigger tests on thedeployment_status event. You can
copy this workflow into .github/workflows/trigger-e2e.yaml:
GITHUB_TOKEN environment variable lets the action pull branch info for
the deployment, which is attached to the test run report.
Other providers
For other CI/CD providers, you can trigger a test run with an API call.Minimal snippet
Metadata for reporting
You can add metadata that will be associated with the test run report.- Repo where the trigger was sent from
- Details of the commit or branch
- Other metadata (key-value pairs)
Pull request runs
For a pre-merge run on an application pull request, sendtrigger with the pull request. The
run uses the matching test branch, merged into the default branch. See
Branching.
trigger automatically on pull_request workflow events.
Concurrency
Tell Empirical what to do when a run for the same thing is already going. Runs that share aconcurrency.group (within the project) execute one at a time; on_conflict is what the
new run does when the group is busy. See Concurrency.
"on_conflict": "wait" to queue behind it instead, or the deployment URL as the group when
one server can only take one run at a time.