Sharing the Composer cache in GitHub Actions made PHPUnit integration tests 31% faster
DanielLockyer · x · 2026-11-22
Developer DanielLockyer merged a PR into PHPCSStandards/composer-installer that shares one Composer cache across integration tests in GitHub Actions, cutting Ubuntu jobs from 2–3 min to 1–2 min (31% faster overall) and speeding up Windows jobs by 8%.
The root cause: each test created a fresh COMPOSERHOME, so with no COMPOSERCACHEDIR set, Composer's cache landed inside it and every test re-downloaded Packagist metadata and archives. The fix sets COMPOSERCACHEDIR to .cache/composer via putenv() in tests/bootstrap.php, leaving pre-existing values untouched, and adds /.cache/ to .gitignore.
More from coding & agent
- Google's Mirror Dimension: synthetic web for safe browser-agent testing — shashib · 2026-11-22
- Exposing Google/YouTube trending searches to agents via an MCP tool — Substantial-Tour-581 · 2026-11-22
- What hard stops do you put on your AI agents? A practical red-line list — Virtual_Arachnid7916 · 2026-11-22
- Stardock CEO shows Clairvoyance: hierarchies of 71 AI 'staff' agents building Sins of a Solar Empire II — draginol · 2026-11-22
- FieldCraft: pure-Rust open-source CAE tool bundles FEA, heat and fluids with MCP support for AI agents — Promptmethus · 2026-11-22
- Photo-to-game-asset workflow turns one photo into Unity-ready 3D plants for $4 — Promptmethus · 2026-11-22