Example for running Playwright tests with Currents on Buildkite.
Public Pipeline: https://buildkite.com/andrew-goldis/currents-buildkite
The pipeline demonstrates how to:
- Run tests inside the official Playwright Docker image.
- Install dependencies and Chromium browser.
- Run tests in parallel using Buildkite's
parallelismfeature (3 shards). - Report results to Currents via the reporter configured in
playwright.config.ts.
Buildkite provides BUILDKITE_PARALLEL_JOB (0-indexed) and BUILDKITE_PARALLEL_JOB_COUNT environment variables. Since Playwright shards are 1-indexed, the pipeline computes BUILDKITE_PARALLEL_JOB + 1 for the shard index:
npx playwright test --shard=$((BUILDKITE_PARALLEL_JOB + 1))/$BUILDKITE_PARALLEL_JOB_COUNTplaywright.config.ts: Playwright config with Currents reporter enabled..buildkite/pipeline.yml: Buildkite pipeline definition.
Set CURRENTS_RECORD_KEY using Buildkite Secrets.