Get started
Install the Boba GitHub App, add a card, and change two lines in the workflow job that runs Playwright. Boba then runs your suite on your next push.
Install the app and add a card
Open useboba.dev/install, pick the repositories Boba may run, and save a card when Boba asks for one. Boba runs no job until you add a card. When you save your first card, Boba adds a one-time $5 credit.
Change two lines
In the job that runs your Playwright tests, change runs-on and the step that runs Playwright:
.github/workflows/e2e.yml
jobs:
e2e:
runs-on: coldtea-boba # was: ubuntu-latest
steps:
- uses: actions/checkout@v4
# ...your install, build and app start steps, unchanged
- uses: coldteadotai/boba@v1 # was: run: npx playwright test- Keep every step before the Playwright step as it is, and leave your Playwright config alone.
- If the old test step also started your app, an API or a worker in the background, move those commands into their own step just before
coldteadotai/boba@v1. Boba starts the tests with them already running. GitHub starts each step in a fresh shell, so write any variable they export to$GITHUB_ENV. - Boba stops a job after 60 minutes. Keep each Boba job under that.
Your first run
On your first run, Boba takes about as long as your CI does now. On every push after that, Boba gets to your tests faster.
When the run ends, Boba posts one check named Boba on the commit, and the same summary as a comment on the pull request. Read What to expect to see what the check and the report hold.
Pull requests from forks
If your repository takes pull requests from forks, send them to the coldtea-boba-outside label, so Boba never runs fork code on a runner your own branches use:
runs-on: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'coldtea-boba-outside' || 'coldtea-boba' }}Cancel superseded runs
Add this block and GitHub cancels a run when you push again to the same branch or pull request. GitHub still runs every commit on your default branch and in a merge queue.
concurrency:
group: boba-${{ github.workflow }}-${{ (github.event_name == 'merge_group' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) && github.sha || github.ref }}
cancel-in-progress: trueKeep your build cache
If your job builds a Next.js app, add this step just before the build. Each push then builds on the last one's cache, and Next.js recompiles only what changed. Boba restores it from the machine's own disk. On a 200-page Next.js app this took the build from 25 s to 10 s.
- uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml', 'package-lock.json', 'yarn.lock', 'bun.lock') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml', 'package-lock.json', 'yarn.lock', 'bun.lock') }}-
- run: npm run build- In a monorepo, set
pathto the.next/cachefolder of each app the job builds. - Keep the commit in the key. Hashing your source files walks
node_modulesand adds seconds to every run. - If you build through Turborepo, cache
.turbo/cache(or thecacheDiryourturbo.jsonsets) the same way, withturboin place ofnextjsin both keys.
Several Playwright steps in one job
Put them all in one Boba step. Boba runs the step's own config and playwright-args as one suite. List each other step under suites, with the config, args and env it used. Boba posts one check with a section for each.
- uses: coldteadotai/boba@v1
with:
suites: |
- name: email
config: e2e/playwright.config.email.ts
args: --grep @email
env:
E2E_ALLOW_EMAIL_CHANGE: 'false'Step inputs
On runs-on: coldtea-boba you can leave out every input.