Yoast / yoast-acf-analysis

WordPress plugin that adds the content of all ACF fields to the Yoast SEO score analysis.
https://wordpress.org/plugins/acf-content-analysis-for-yoast-seo/
GNU General Public License v3.0
62 stars 20 forks source link

GH Actions: various tweaks #325

Closed jrfnl closed 1 year ago

jrfnl commented 1 year ago

Summary

This PR can be summarized in the following changelog entry:

Relevant technical choices:

GH Actions: minor simplification

... of the bash date command in the earlier pulled cache busting.

GH Actions: improve performance of the CS step

All the repos in the Yoast organisation contain a <arg name="cache" value="./.cache/phpcs.cache"/> directive in the PHPCS ruleset. This directive makes running PHPCS faster by caching the run results in a file and only scanning changed files when running PHPCS again.

However, when there is no cache available, running with the cache option enabled will make PHPCS slower as the cache needs to be created and the file read/write actions slow PHPCS down.

In GH Actions, we are not caching the PHPCS cache file, which means that there is cache file available and running with cache will be slower.

By adding the --no-cache option, the cache directive in the ruleset is ignored, which should result in a slightly faster runtime for the CS workflow.

Note: the alternative would be to cache the cache file in GH Actions, but aside from the two very frequently changing repos, there's not much point doing that.

Test instructions

This PR can be tested by following these steps: