CI: Add concurrency to CI configs, and Composer tweaks #559
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
Add concurrency to CI configs
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.
Composer tweaks
ramsay/composer-install
, the action used to install Composer packages and handle the caching has released a new major (and some follow-up patch releases), which means the action reference needs to be updated to benefit from it.--no-interaction
to "plain" Composer commands to potentially prevent CI hanging if, for whatever reason, interaction would be needed in the future.Composer: permit composer plugins
The
dealerdirect/phpcodesniffer-composer-installer
andcomposer/installers
Composer plugins are used to register an external PHPCS standards with PHPCS, and allow the plugin to be installed in awp-content/plugins
directory.As of Composer 2.2.0, Composer plugins need to be explicitly allowed to run. This adds the necessary configuration for that.
Any globally-installed Composer plugin should be configured in the global
composer.json
.composer normalize
also run on the file, which fixes a non-alphabetical script.Also, refreshes the list of script descriptions.
Refs:
Motivation and Context
All kudos to @jrfnl - 95% of this PR is her original work and words from Automattic/VIP-Coding-Standards#705 🙏🏻
How Has This Been Tested?
The CI jobs for this PR all pass.