Skip to content

Cache the Pint result in the Laravel static checks - #14

Merged
PavlosIsaris merged 1 commit into
mainfrom
ci/pint-result-cache
Oct 22, 2026
Merged

PavlosIsaris merged 1 commit into
mainfrom
ci/pint-result-cache

Conversation

@PavlosIsaris

Copy link
Copy Markdown
Member

The Static checks job of laravel-ci.yml ran Pint on every file on each run. On a GitHub runner this takes about 25-40 s for a project with 600 PHP files.

Changes:

  • The automatic Pint step runs pint --test --cache-file=$RUNNER_TEMP/pint.cache.
  • The analysis cache step also saves and restores that file. Its name is now Cache PHPStan, Rector and Pint results.
  • The guide explains how a repository with a custom lint-command can use the cache: cache-file in pint.json, plus the file in analysis-cache-paths.

Pint (PHP-CS-Fixer) stores its version, the PHP version and the rules in the cache. It discards a cache that does not match, so a Pint upgrade or a pint.json change cannot give a false pass.

No new inputs. Existing callers need no change.

Pint checked every file on each run, about 25-40 s on a GitHub runner. The automatic Pint step now writes its cache to the runner's temporary folder, and the analysis cache step saves and restores it. Pint stores its version and rules in the cache, so an outdated cache is discarded. The guide explains how a custom lint-command can use the same cache.
@PavlosIsaris
PavlosIsaris merged commit 2ed3d6b into main Oct 22, 2026
28 checks passed
@PavlosIsaris
PavlosIsaris deleted the ci/pint-result-cache branch October 22, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant