testsprite-ci
Skill1 starsChanged 15 days agoMITView on GitHub
Configure TestSprite continuous integration testing pipelines and automated
- Reads credentials
- Installs packages
In this repository36 other files it gives its agents.
- .cursor/rules/agent-superpowers.mdcCursor rule
- arch-archaeologistSkill
- graphifySkill
- hindsight-architectSkill
- ghost-runnerSkill
- figma-designerSkill
- frontend-sentinelSkill
- hallmarkSkill
- landing-page-designSkill
- review-frontend-productionSkill
- hindsight-coding-agentSkill
- memory-nexusSkill
- video-shotcraftSkill
- caveman-compressSkill
- cavemanSkill
- prompt-optimizerSkill
- token-squeezerSkill
- using-superpowersSkill
- api-synthesizerSkill
- blackbox-clonerSkill
- agent-reachSkill
- firecrawl-buildSkill
- firecrawl-build-interactSkill
- firecrawl-build-onboardingSkill
- firecrawl-build-scrapeSkill
- firecrawl-build-searchSkill
- scrapling-officialSkill
- adversarial-duelistSkill
- testsprite-verifySkill
- caveman-commitSkill
- feature-brainstormerSkill
- git-worktree-sandboxSkill
- ponytail-auditSkill
- ponytail-debtSkill
- ponytail-reviewSkill
- ponytailSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Put testsprite ci run into the repo's CI so every pull request's preview deployment is tested before it merges.
- Distinctive: line 49
If this turns out to be more setup than the user wants, the TestSprite GitHub App (Portal → project → Integrations) runs the same tests on …
- Very specific: line 59
No workflow deploys, and vercel.json / .vercel/ / netlify.toml or the platform's git integration is present: A — the platform deploys every …
- Very specific: line 74
Not linked but the user wants A: connect the repository to the platform's git integration (Vercel: project → Settings → Git, or npx vercel …
- Very specific: line 107
Keep what the template fixes: testsprite ci run … --target-url "$PREVIEW_URL" --fail-on-skipped --summary-file, npm i -g …
- Distinctive: line 135
Commit and push the workflow on a branch, open a PR that is not a draft and has
- Very specific: line 143
If nothing ran: a draft PR prints Skipping draft pull request and exits 0 with no summary (mark it ready and re-run the job).
- Distinctive: line 171
Don't add a CI gate next to the GitHub App on the same project without asking.
- Very specific: line 172
Don't run vercel link --yes.
- Distinctive: line 173
Don't pin the CLI version in the workflow.
- Very specific: line 174
Don't commit a loopback or private --target-url (ci run refuses it).
- Distinctive: line 175
Don't skip step 5: a workflow that has not run on a real PR is not onboarded.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
User-facing content for `testsprite agent install` (skill: testsprite-ci).
Body only — name + description frontmatter is emitted by the install wrapper.
The cursor (.mdc), cline (.clinerules), and antigravity (experimental)
wrappers reuse this body verbatim and swap only the frontmatter/header.
-->TestSprite: gate pull requests in CI
Put testsprite ci run into the repo's CI so every pull request's preview
deployment is tested before it merges.
This skill uses shipped CLI commands plus git, gh and the deploy platform's own
CLI. Do not call backend APIs directly.
When to use
- "Add TestSprite to CI / GitHub Actions", "run the tests on every PR", "block merges on the tests", "PR gate".
- The project already has tests. If not, onboard it first with the
testsprite-onboardskill.
When NOT to use
- A nightly run of a fixed environment:
testsprite ci run --project <id> --env <name>on aschedule:trigger. No pull-request context is involved.
If this turns out to be more setup than the user wants, the TestSprite GitHub App (Portal → project → Integrations) runs the same tests on every pull request with one click.
1. Find out how pull requests get deployed (the shape)
Decide from configuration. Read .github/workflows/ and the repo root, in this order:
- A workflow step already runs
vercel deploy,netlify deployor a deploy script: B — the workflow deploys. Trigger:on: pull_request. - No workflow deploys, and
vercel.json/.vercel//netlify.tomlor the platform's git integration is present: A — the platform deploys every PR. Trigger:on: deployment_status. - Neither is clear: ask the user who deploys their pull-request previews.
Deployment history is a reference, not the decision:
gh api repos/{owner}/{repo}/deployments --jq '.[] | "\(.environment) \(.ref[0:8]) \(.created_at)"'Recent preview records support A; production-only records mean preview deploys are off on the platform. History is evidence, not configuration — the proof is a real pull request (step 5).
Not linked but the user wants A: connect the repository to the platform's git
integration (Vercel: project → Settings → Git, or npx vercel git connect with the
user's approval — never --yes), or use shape B instead. Installing the platform's
GitHub App is a browser step only the user can do.
2. Pick the environment the gate signs in with
testsprite project env list <project-id>Choose the environment whose account the gate should sign in with. ci run
--target-url swaps only its address for the pull request's preview; the sign-in
stays. Without --env the project's default is written into the workflow by name.
3. Generate the workflow, then finish it by hand
testsprite ci init github --project <project-id> --env <name>This writes .github/workflows/testsprite.yml with one step marked REPLACE ME
(the job fails until it is replaced):
- A: change the trigger from
pull_request:todeployment_status:and delete the placeholder step; the run then reads the URL fromdeployment_status.environment_url. A repo that deploys several Vercel projects gets one event per project for the same commit — add&& github.event.deployment.environment == 'Preview – <project>'to thedeployment_statusbranch of theif:. - B: replace the placeholder's
run:with the deploy commands, ending inecho "url=<preview address>" >> "$GITHUB_OUTPUT". The platform token goes in its own repo secret.
Keep what the template fixes: testsprite ci run … --target-url "$PREVIEW_URL"
--fail-on-skipped --summary-file, npm i -g @testsprite/testsprite-cli@latest (no
version pin — verdicts come from the backend), fork and draft PRs skipped, the upload
step on if: always(), and concurrency on the job (keyed by PR number in B, by
commit in A). Never re-judge pass/fail in YAML (jq + exit 1): ci run's exit code
is the gate. Regenerate with --force; the previous file is kept as .bak.
4. Secrets
gh secret set TESTSPRITE_API_KEY # paste when prompted, or pipe on stdin(ci init github --set-secret does the same.) Never put the key in argv, YAML or
logs. A non-production endpoint goes in the workflow env: as TESTSPRITE_API_URL.
B also needs the platform's deploy token as a secret.
5. Preflight, then prove it on one real pull request
Three checks before pushing; each of these otherwise shows up only as a red check with the cause buried in the job log:
gh auth status # gh can see this repo
gh secret list | grep TESTSPRITE_API_KEY # the secret landed (B: the deploy token too)
actionlint .github/workflows/testsprite.yml # the file parses — or `gh workflow view TestSprite` after the pushCommit and push the workflow on a branch, open a PR that is not a draft and has
no merge conflicts, and watch the TestSprite / testsprite-tests check. The log shows
Dispatched N tests. then CI run: x/y passed …; the job summary is the execution
report (the same content as the App's PR comment); a testsprite-results artifact
holds testsprite-summary.json. Then suggest making the check required in branch
protection. In shape A the workflow file runs at the deployed commit, so the PR
branch itself is enough — nothing has to be merged first.
If nothing ran: a draft PR prints Skipping draft pull request and exits 0 with no
summary (mark it ready and re-run the job); a PR with merge conflicts never fires
pull_request workflows and GitHub shows no error; no run at all, not even the repo's
own workflows, means Actions is disabled on the repository (common on forks) — the
Actions tab shows an enable button; enable it and push an empty commit; in shape A
check that a
deployment_status with state success arrived for that commit (production
deployments are filtered out by the if:).
Reading the result
- The check is
ci run's exit code: 1 = a test failed, 7 = timeout or an unsupported backend, 5 = configuration. A summary opening with a CI gate warning means the CLI's own counts differ from the report (a run it could not read, a timeout) — the check is right, the report is the server's view of the execution. exit 7with "did not confirm the single-execution admission mode" = the backend is too old forci run; the dispatched runs were cancelled and refunded.- Screenshots in the report are capped at 12 per execution; later rows show
—. - Shape A is per commit: a new push starts its own run against its own preview, and cancelling the job only stops the CLI — the execution keeps running and reports in the Portal.
- Backend tests use the URL baked into their code, not
--target-url. - Testing
ci runlocally: a shell that exportsTESTSPRITE_API_URLorTESTSPRITE_API_KEYoverrides--profile— afetch failedagainst a healthy API is usually that. Checkenv | grep TESTSPRITE_first.
Don'ts
- Don't add a CI gate next to the GitHub App on the same project without asking.
- Don't run
vercel link --yes; don't pass secrets as arguments. - Don't pin the CLI version in the workflow; don't parse the summary to decide the verdict.
- Don't commit a loopback or private
--target-url(ci runrefuses it). - Don't skip step 5: a workflow that has not run on a real PR is not onboarded.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

