Playwright CI Caching

•
203
•

Accelerates CI/CD pipelines by caching Playwright browser binaries and automating version-based cache invalidation for .NET projects.

This skill optimizes .NET end-to-end testing workflows by implementing efficient browser binary caching for GitHub Actions and Azure DevOps. It automates the extraction of Playwright versions from Central Package Management (CPM) files to ensure cache keys remain synchronized with project dependencies, effectively eliminating the 1-2 minute overhead of downloading ~400MB of browsers on every build. By utilizing OS-specific paths and conditional installation logic, it provides a robust pattern for reducing build times, saving bandwidth, and stabilizing PR feedback loops across Linux, macOS, and Windows environments.

主な機能

01Cross-platform support for GitHub Actions and Azure DevOps
02Conditional installation scripts to minimize redundant CLI execution
03Automated Playwright version extraction from Directory.Packages.props
04Version-based cache key generation to prevent stale binary mismatches
05Multi-OS path management for Linux, macOS, and Windows runners
06203 GitHub stars

ユースケース

01Accelerating pull request feedback loops in .NET repositories with Playwright E2E tests
02Standardizing browser setup across heterogeneous CI environments (GitHub and Azure)
03Reducing CI/CD infrastructure costs and bandwidth usage by caching large browser assets