mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Build/Test Tools: Cache the results of PHP_CodeSniffer across workflow runs.
When the `PHP_CodeSniffer` runs, it produces a cache file. When a cache file is present, only changed files are rescanned, making subsequent scans significantly faster. This adds the needed steps to the corresponding GitHub Actions workflows to cache these files across runs. The cache keys include the date of the previous Monday to ensure that the cache is flushed at least weekly. Since GitHub Action caches cannot be updated once created, the scans will take slightly longer as the week progresses and more PHP files are updated. The date within the cache key can be updated to purge twice weekly if the scan time starts to approach the current scan times. This change also introduces a `.cache` directory for all caching files related to build/test tools. Props johnbillion, jrf. Fixes #49783. git-svn-id: https://develop.svn.wordpress.org/trunk@52179 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
||||
<arg name="extensions" value="php"/>
|
||||
|
||||
<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
|
||||
<arg name="cache"/>
|
||||
<arg name="cache" value=".cache/phpcs.json"/>
|
||||
|
||||
<!-- Set the memory limit to 256M.
|
||||
For most standard PHP configurations, this means the memory limit will temporarily be raised.
|
||||
|
||||
Reference in New Issue
Block a user