Skip to content

Ci/composer caching#5641

Merged
GlazerMann merged 5 commits into
ms609:masterfrom
redalert2fan:ci/composer-caching
Jun 29, 2026
Merged

Ci/composer caching#5641
GlazerMann merged 5 commits into
ms609:masterfrom
redalert2fan:ci/composer-caching

Conversation

@redalert2fan

Copy link
Copy Markdown
Contributor

Changes

Add actions/cache@v4 step to 8 PHP workflows to cache the vendor/ directory between runs:

  • test-suite.yml, phpstan.yml, psalm.yml, psalm-security.yml
  • phan.yml, PHPCodeSniffer.yml, phplint.yml, DesignSecurity.yml

Cache key is based on hashFiles('**/composer.lock'), so it auto-invalidates when dependencies change. On cache hit, composer install validates and finishes in ~2-3s instead of re-downloading all packages (~20-40s per workflow).

2 workflows (PHPChecker.yml, ThePHPChecker.yml) use composer update --no-install and don't generate a vendor/ directory, so caching doesn't apply.

Expected impact

  • Estimated ~5-9 minutes saved per push across all workflows
  • No regression risk — on stale cache, composer install detects mismatch and re-installs normally

@github-actions github-actions Bot added the ci label Jun 29, 2026
@GlazerMann GlazerMann merged commit 69a7bbd into ms609:master Jun 29, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants