GH Actions: various improvements & tweaks #70
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
GH Actions: don't ignore markdown-only changes
... on pull requests as it doesn't play nice with required statuses.
GH Actions: auto-cancel previous builds for same branch
Previously, in Travis, when the same branch was pushed again and the "Auto cancellation" option on the "Settings" page had been turned on (as it was for most repos), any still running builds for the same branch would be stopped in favour of starting the build for the newly pushed version of the branch.
To enable this behaviour in GH Actions, a
concurrency
configuration needs to be added to each workflow for which this should applied to.More than anything, this is a way to be kind to GitHub by not wasting resources which they so kindly provide to us for free.
Refs:
GH Actions: remove the composer validate step
... as Composer will always validate when installing anyway.
GH Actions: harden the workflow against PHPCS ruleset errors
If there is a ruleset error, the
cs2pr
action doesn't receive anxml
report and exits with a0
error code, even though the PHPCS run failed (though not on CS errors, but on a ruleset error).This changes the GH Actions workflow to allow for that situation and still fail the build in that case.
Note: not really all that important on this repo as the step is also run on the other PHP versions without
cs2pr
, but still good to showcase best practices for using PHPCS withcs2pr
.GH Actions: skip fewer tests
Install some external tooling which is required for certain tests to be able to run.
GH Actions: various other small tweaks
Ref: https://blog.packagist.com/composer-2-2/#-ignore-platform-req-improvements
Suggested changelog entry
N/A