GitHub + Vercel

Test every pull request's preview and get the results as a comment on the PR. Setup takes about 15 minutes.

1. Add the workflow

Save this as .github/workflows/tensteps.yml:

name: Tensteps

on:
  # A preview finished deploying.
  deployment_status:
  # A PR was opened after its branch's preview was already built.
  pull_request:
    types: [opened, reopened, ready_for_review]

permissions:
  contents: read
  pull-requests: write
  deployments: read

jobs:
  tensteps:
    if: github.event_name == 'pull_request' || github.event.deployment_status.state == 'success'
    runs-on: ubuntu-latest
    timeout-minutes: 30
    concurrency:
      group: tensteps-${{ github.event.deployment.sha || github.event.pull_request.head.sha }}
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.deployment.sha || github.event.pull_request.head.sha }}
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - name: Run Tensteps
        continue-on-error: true
        run: npx --yes tensteps@beta run --max-cost 10
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          VERCEL_AUTOMATION_BYPASS_SECRET: ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}
          GITHUB_TOKEN: ${{ github.token }}
      - name: Upload the report
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: tensteps-report
          path: .tensteps/runs/
          if-no-files-found: ignore
          retention-days: 30

2. Add your tensteps.yml

Commit a tensteps.yml at the repo root (see the Quickstart). Set how many personas a pull request gets:

triggers:
  pull_request: { sessions: 6 }

Without a triggers block, a pull request gets 30 personas per study, which costs more than you probably want while trying it out.

3. Add the secrets

In the repo's Settings → Secrets and variables → Actions, add:

| Secret | Where to get it | | --- | --- | | ANTHROPIC_API_KEY | Claude Console → API keys. Use a key with a spend limit. | | VERCEL_AUTOMATION_BYPASS_SECRET | Only if your previews use Deployment Protection: Vercel project → Settings → Deployment Protection → Protection Bypass for Automation. |

Secrets your studies log in with (secret:TEST_PASSWORD in auth) are read from environment variables of the same name; add them as secrets and to the step's env.

What happens on a pull request

What gets skipped

Tensteps skips, and says why on the run's summary page: