Skip to main content

github-actions-ci-cd

  1. Use caching for node_modules and Playwright browsers to speed up runs
  2. Run tests only on relevant branches (e.g., main, PRs)
  3. Use Linux runners for the best minute efficiency
  4. Optimize test parallelization to reduce total runtime
  5. Set artifact retention policies to clean up old test reports automatically
  • Layered Caching: We will cache ~/.cache/ms-playwright (the browsers) and node_modules. Browsers are ~500MB+; downloading them every time is the #1 killer of free minutes.
  • Sharding vs. Parallelization: Instead of one long 10-minute job, we can split Playwright tests into 3 parallel "shards." On Linux runners, this is highly efficient and keeps your "Time to Green" very low.