-
-
Notifications
You must be signed in to change notification settings - Fork 460
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 changes #2215
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since Composer 2.2, we can be more specific about which platform requirements should be ignored. This change ensures that only the "high" end of a PHP requirement will be ignored and no other platform requirements are ignored. Ref: https://blog.packagist.com/composer-2-2/#-ignore-platform-req-improvements
The `include` section was set up in Travis (and transferred to GH Actions) as the _lowest_ supported PHPCS version at that time, wasn't compatible with the highest supported PHP version (yet). As that is no longer the case, we can now bring this back to a simplified matrix for the Quick Test and just test against high/low PHP with high/low PHPCS.
Given that: * The ruleset test doesn't need PHPUnit to run. * The ruleset test is run on PHP `latest`, which conflicts with our highest supported PHPUnit version. * And the Composer install is run without `--ignore-platform-*` resulting in PHPUnit 5.2.7 being installed (last PHPUnit version which didn't have a PHP requirement) I propose to install with `--no-dev` for the ruleset test. While this doesn't necessarily remove the "conflict", it should still make the Composer install faster and at least won't create a cache with a completely incorrect PHPUnit version.
jrfnl
force-pushed
the
feature/ghactions-test-changes
branch
2 times, most recently
from
March 24, 2023 11:16
2e1f3a2
to
df2ac17
Compare
As things were, whenever the minimum PHPCS version would be changed, the branch protection settings for both the `master` and the `develop` branch would need to be updated and all "required builds" referencing the old PHPCS version would need to be removed, while new "required builds" would need to be added referencing the new minimum PHPCS version. This was a fiddly process and time-consuming. The change proposed in this commit takes advantage of the Composer `--prefer-lowest` setting to archive the same without a hard-coded PHPCS version in the build name, which means that once the branch protection settings have been updated for this PR, they shouldn't need updating anymore for future PHPCS version bumps.
jrfnl
force-pushed
the
feature/ghactions-test-changes
branch
from
March 24, 2023 11:18
df2ac17
to
957ee9e
Compare
GaryJones
approved these changes
Mar 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
dingo-d
approved these changes
Mar 27, 2023
I've updated the branch protection settings. Merging now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a prelim PR before updating the PHPCS version to allow for simplifying the management of the protected branches
Note:
The protected branch settings will need an update before this PR becomes mergable, but after this, it shouldn't need updating that often anymore.
Once this PR has received approvals, I will update the required statuses and merge the PR myself.
GH Actions: minor tweak to composer install
Since Composer 2.2, we can be more specific about which platform requirements should be ignored.
This change ensures that only the "high" end of a PHP requirement will be ignored and no other platform requirements are ignored.
Ref: https://blog.packagist.com/composer-2-2/#-ignore-platform-req-improvements
GH Actions/quicktest: simplify the matrix
The
include
section was set up in Travis (and transferred to GH Actions) as the lowest supported PHPCS version at that time, wasn't compatible with the highest supported PHP version (yet).As that is no longer the case, we can now bring this back to a simplified matrix for the Quick Test and just test against high/low PHP with high/low PHPCS.
GH Actions/ruleset-test: minimize the install
Given that:
latest
, which conflicts with our highest supported PHPUnit version.--ignore-platform-*
resulting in PHPUnit 5.2.7 being installed (last PHPUnit version which didn't have a PHP requirement)I propose to install with
--no-dev
for the ruleset test.While this doesn't necessarily remove the "conflict", it should still make the Composer install faster and at least won't create a cache with a completely incorrect PHPUnit version.
GH Actions: tweak the way the PHPCS versions are set
As things were, whenever the minimum PHPCS version would be changed, the branch protection settings for both the
master
and thedevelop
branch would need to be updated and all "required builds" referencing the old PHPCS version would need to be removed, while new "required builds" would need to be added referencing the new minimum PHPCS version.This was a fiddly process and time-consuming.
The change proposed in this commit takes advantage of the Composer
--prefer-lowest
setting to achieve the same without a hard-coded PHPCS version in the build name, which means that once the branch protection settings have been updated for this PR, they shouldn't need updating anymore for future PHPCS version bumps.