Overview
The Stably GitHub Action runs your Playwright tests on Stably’s cloud infrastructure directly from your GitHub Actions workflows. It supports two modes: Agents (v2) for project-based runs, and Classic (v1) for test-suite-based runs. The action auto-detects which version to use based on your inputs.Quick Start
Inputs (v2 — Agents)
| Input | Required | Default | Description |
|---|---|---|---|
api-key | Yes | — | Your Stably API key |
project-id | Yes | — | Your Stably project ID |
playwright-project-name | No | — | Playwright project name(s) to run (maps to --project CLI flag). If omitted, all projects run. |
environment-name | No | — | Environment to use (e.g. “Staging”, “Production”). Falls back to the project’s default. |
env-overrides | No | — | YAML string or JSON object of environment variable overrides |
github-comment | No | true | Post test results as a PR/commit comment |
github-token | No | ${{ github.token }} | Token for posting comments. Override with a PAT if needed. |
async | No | false | Launch tests without waiting for results. Comments won’t work in async mode. |
Inputs (v1 — Classic)
| Input | Required | Default | Description |
|---|---|---|---|
api-key | Yes | — | Your Stably API key |
test-suite-id | Yes | — | The test suite ID to execute |
environment | No | PRODUCTION | Environment to inherit variables from |
variable-overrides | No | {} | JSON object of variable overrides |
note | No | — | Optional note to help identify the run |
github-comment | No | true | Post test results as a PR/commit comment |
github-token | No | ${{ github.token }} | Token for posting comments |
async | No | false | Launch tests without waiting for results |
Outputs
| Output | Description |
|---|---|
success | Boolean indicating if the run was successful |
runId | The resulting run ID (v2 only) |
testSuiteRunId | The resulting test suite run ID (v1 only) |
Examples
Run Specific Playwright Projects
Override Environment Variables
Use a Dynamic Preview URL
If your deployment URL is generated by a previous step (e.g. Vercel, Netlify):Classic (v1) Example
Check Outputs
Permissions
If using thegithub-comment feature (enabled by default), add these permissions at the top of your workflow:
Settings > Actions > General > Workflow permissions.
For organizations, you must first allow these permissions at the organization level before they can be set per-repository.
Using the CLI Instead
You can also run Stably tests directly via the CLI in GitHub Actions:Next Steps
GitLab CI
Integrate with GitLab CI/CD
Alerting
Configure notifications for test results