playwright-ci-caching

Cache Playwright browser binaries in GitHub Actions and Azure DevOps pipelines.

Updated Dec 4, 2022
One-click install
npx skills add https://github.com/devingoble/CloudOStat --skill playwright-ci-caching-devingoble
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-ci-caching
Source: https://github.com/devingoble/CloudOStat/tree/main/.github/skills/playwright-ci-caching
Command: npx skills add https://github.com/devingoble/CloudOStat --skill playwright-ci-caching-devingoble

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill significantly reduces CI/CD build times by caching Playwright browser binaries, avoiding slow downloads on every pipeline run.

Core Features & Use Cases

  • CI/CD Optimization: Integrates seamlessly with GitHub Actions and Azure DevOps.
  • Automated Cache Management: Uses Playwright version for automatic cache invalidation.
  • Conditional Installation: Downloads browsers only on cache misses.
  • Use Case: Speed up your Playwright E2E test suite execution in CI by ensuring browser binaries are cached and reused across builds.

Quick Start

Use the playwright-ci-caching skill to cache Playwright browser binaries in your GitHub Actions workflow.

Frequently Asked Questions about playwright-ci-caching

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

FAQPage Schema
How do I cache Playwright browser binaries in GitHub Actions?

To cache Playwright browser binaries in GitHub Actions, you extract the Playwright version from project files to generate a cache key, ensuring browsers are conditionally installed only on cache misses to eliminate download overhead. This approach automatically invalidates the cache when the version changes.

Why does caching Playwright browsers speed up CI builds?

Caching Playwright browsers speeds up CI builds by avoiding slow browser binary downloads on every pipeline run. It reuses cached binaries across builds and automatically invalidates the cache when the Playwright version changes, ensuring fast execution without stale dependencies.

Does Playwright CI caching work with Azure DevOps pipelines?

Yes, Playwright CI caching works with Azure DevOps pipelines. It supports extracting the Playwright version from project files to generate cache keys, ensuring conditional browser installation and automatic cache invalidation based on version changes within Azure DevOps.

How is the cache invalidated when Playwright versions update?

The cache is invalidated automatically based on version changes by extracting the Playwright version from your project files to generate the cache key. When the version updates, the key changes, resulting in a cache miss that triggers a fresh browser binary download.

What's the best way to avoid downloading Playwright browsers on every CI run?

The best way to avoid downloading Playwright browsers on every CI run is to implement conditional installation using cached browser binaries. By using the Playwright version as a cache key, browsers are only downloaded during a cache miss, significantly reducing CI/CD build times.

When do I need to cache Playwright binaries in my CI pipeline?

You need to cache Playwright binaries in your CI pipeline when your E2E test suite experiences slow build times due to repeated browser downloads. Caching reuses binaries across runs, which is essential for optimizing CI/CD performance in GitHub Actions or Azure DevOps.