360 Secure SkillHub
360 安全技能中心

playwright-ci

该 Skill 是一组关于 Playwright 端到端测试 CI/CD 实践的参考文档,覆盖 GitHub Actions、GitLab CI、CircleCI、Azure DevOps、Jenkins、Docker 容器化、并行与分片、多项目配置、报告与产物、代码覆盖率以及全局 setup/teardown,提供可直接复制改造的配置示例与最佳实践清单。

分类:开发
testdino-hq
热度 0.00
最近更新 2026-11-26 05:10:54

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add testdino-hq/playwright-skill/playwright-ci
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
playwright-ci
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.

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
GitLab CI ci-gitlab.md
CircleCI / Azure DevOps / Jenkins ci-other.md

Execution & Scaling

Topic Guide
Parallel execution & sharding parallel-and-sharding.md
Docker & containers docker-and-containers.md
Multi-project config projects-and-dependencies.md

Reporting & Setup

Topic Guide
Reports & artifacts reporting-and-artifacts.md
Code coverage test-coverage.md
Global setup/teardown global-setup-teardown.md