playwright-ci

Configure Playwright test pipelines across GitHub Actions, GitLab CI, CircleCI, Azure DevOps, and Jenkins.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/farslab/claude-skills --skill playwright-ci-farslab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright-ci
Source: https://github.com/farslab/claude-skills/tree/main/playwright-skill/ci
Command: npx skills add https://github.com/farslab/claude-skills --skill playwright-ci-farslab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up Playwright end-to-end tests in CI/CD pipelines involves many pitfalls: slow runs, missing browser dependencies, lost reports, flaky parallel execution, and misconfigured sharding. This Skill provides copy-paste-ready pipeline configurations and troubleshooting guidance for every major CI provider. ## Core Features & Use Cases - CI Provider Configurations: Production-ready workflow files for GitHub Actions, GitLab CI, CircleCI, Azure DevOps, and Jenkins, including caching, secrets, and artifact uploads. - Parallel Execution & Sharding: Patterns for splitting test suites across runners with --shard, merging blob reports, and worker-scoped fixtures. - Docker & Containers: Official Playwright image usage, custom Dockerfiles, docker-compose stacks with databases, and digest pinning for supply-chain security. - Reporting & Setup: HTML/JUnit/blob reporters, artifact retention, code coverage, and global setup/teardown for auth state and database seeding. - Use Case: Your Playwright suite takes 25 minutes on every pull request. Use this Skill to add a sharded GitHub Actions workflow with browser caching and merged HTML reports, cutting feedback time under 10 minutes. ## Quick Start Set up a sharded Playwright workflow for GitHub Actions with browser caching and merged HTML reports.

Frequently Asked Questions about playwright-ci

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Playwright tests in GitHub Actions?▼

Create a workflow that checks out the repo, sets up Node.js, caches the ~/.cache/ms-playwright directory keyed on package-lock.json, installs browsers with npx playwright install --with-deps, and runs npx playwright test. Upload the playwright-report folder as an artifact for review.

How to shard Playwright tests across multiple CI runners?▼

Use the --shard=N/M CLI flag with a CI matrix strategy so each runner executes a fraction of the suite. Configure the blob reporter in CI, upload each shard's blob-report as a uniquely named artifact, then merge with npx playwright merge-reports.

Which Docker image should I use for Playwright in CI?▼

Use the official mcr.microsoft.com/playwright image with a tag matching your @playwright/test version, such as v1.52.0-noble. It ships with all browsers and OS dependencies pre-installed, eliminating browser install time in pipelines.

Why do Playwright tests pass locally but fail in CI?▼

CI runners typically have fewer CPU cores and less memory than development machines, causing timeouts. Reduce workers to 50% in CI, raise actionTimeout and navigationTimeout, and ensure OS dependencies are installed with npx playwright install-deps on cache hits.

Does Playwright sharding work with GitLab CI parallel jobs?▼

Yes. GitLab's parallel keyword exposes CI_NODE_INDEX and CI_NODE_TOTAL variables, which map directly to Playwright's --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL flag. Add a downstream merge job that runs npx playwright merge-reports on the collected blob reports.

When should I not shard my Playwright test suite?▼

Avoid sharding when the suite runs in under five minutes, because per-shard overhead like checkout, dependency install, and report merging exceeds the time saved. Sharding pays off for suites exceeding ten minutes of wall-clock time.