# Playwright Ci

Production-ready CI/CD configurations for Playwright, GitHub Actions, GitLab CI...

- Repository: https://github.com/zebbern/claude-code-guide (4691 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add zebbern/claude-code-guide --skill playwright-ci -g -a claude-code -y`
Codex: `npx skills add zebbern/claude-code-guide --skill playwright-ci -g -a codex -y`
Cursor: `npx skills add zebbern/claude-code-guide --skill playwright-ci -g -a cursor -y`
Gemini CLI: `npx skills add zebbern/claude-code-guide --skill playwright-ci -g -a gemini-cli -y`

## Description

Production-ready CI/CD configurations for Playwright, GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, parallel sharding, reporting, code coverage, and global setup/teardown.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Playwright CI/CD

> Ship reliable tests in every pipeline, CI-specific patterns for speed, stability, and actionable reports.

**9 guides** covering CI/CD setup, parallel execution, containerized runs, reporting, and infrastructure patterns for all major CI providers.

## Golden Rules

1. **`retries: 2` in CI only**, surface flakiness in pipelines, not locally
2. **`traces: 'on-first-retry'`**, capture rich debugging artifacts without slowing every run
3. **Shard across runners**, `--shard=N/M` splits tests evenly; scale horizontally, not vertically
4. **Cache browser binaries**, `~/.cache/ms-playwright` keyed on Playwright version
5. **Upload artifacts on failure**, traces, screenshots, and HTML reports as CI artifacts
6. **Use the official Docker image**, `mcr.microsoft.com/playwright:v*` has all OS deps pre-installed
7. **Global setup for auth**, run login once in `globalSetup`, reuse `storageState` across workers
8. **Fail fast, debug later**, keep CI runs short; use trace viewer and HTML reports to investigate

## Guide Index

### CI Providers

| Provider                          | Guide                                        |
| --------------------------------- | -------------------------------------------- |
| GitHub Actions                    | [ci-github-actions.md](ci-github-actions.md) |
| GitLab CI                         | [ci-gitlab.md](ci-gitlab.md)                 |
| CircleCI / Azure DevOps / Jenkins | [ci-other.md](ci-other.md)                   |

### Execution & Scaling

The rest: https://github.com/zebbern/claude-code-guide/blob/HEAD/skills/playwright/ci/SKILL.md
