Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions: various tweaks #48

Merged
merged 3 commits into from
Dec 19, 2022
Merged

GH Actions: various tweaks #48

merged 3 commits into from
Dec 19, 2022

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Dec 19, 2022

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.

GH Actions: enable linting and testing against PHP 8.3

While early days for PHP 8.3, as this is a test related package, it needs to be ready early, so better to start running the lint and test workflows against PHP 8.3 already.

... of the bash `date` command in the earlier pulled cache busting.
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.
While early days for PHP 8.3, as this is a test related package, it needs to be ready early, so better to start running the lint and test workflows against PHP 8.3 already.
@jrfnl jrfnl added this to the 1.x Next Release milestone Dec 19, 2022
@jrfnl jrfnl merged commit 12287f2 into develop Dec 19, 2022
@jrfnl jrfnl deleted the feature/ghactions-tweaks branch December 19, 2022 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant