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

CI: various updates #140

Merged
merged 7 commits into from
Jan 25, 2022
Merged

CI: various updates #140

merged 7 commits into from
Jan 25, 2022

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Dec 23, 2021

CS: minor cleanup

PHPCS 3.6.2 added a sniff for a PSR-12 rule which was previously not strictly checked: "No blank line after the opening brace of a class".

This fixes the newly flagged issues.

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: use error_reporting=-1

... as E_ALL does not always contain all errors across PHP versions.

GH Actions: update the security checker

Ref: https://github.com/fabpot/local-php-security-checker/blob/main/CHANGELOG.md

🆕 GH Actions: version update for ramsey/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.

Refs:

🆕 GH Actions: always use --no-interaction for Composer

Adding --no-interaction to "plain" Composer commands to potentially prevent CI hanging if, for whatever reason, interaction would be needed in the future.

🆕 🆕 GH Actions: version update for actions/checkout

Ref: https://github.com/actions/checkout/releases

PHPCS 3.6.2 added a sniff for a PSR-12 rule which was previously not strictly checked: "No blank line after the opening brace of a class".

This fixes the newly flagged issues.
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:
* https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
* https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
... as `E_ALL` does not always contain _all_ errors across PHP versions.
Potherca
Potherca previously approved these changes Dec 23, 2021
src/Plugin.php Show resolved Hide resolved
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.

Refs:
* https://github.com/ramsey/composer-install/releases/tag/2.0.0
* https://github.com/ramsey/composer-install/releases/tag/2.0.1
* https://github.com/ramsey/composer-install/releases/tag/2.0.2
Adding `--no-interaction` to "plain" Composer commands to potentially prevent CI hanging if, for whatever reason, interaction would be needed in the future.
@jrfnl
Copy link
Member Author

jrfnl commented Dec 24, 2021

Added two extra commits for your review (and updated the PR description).

Potherca
Potherca previously approved these changes Dec 24, 2021
@Potherca
Copy link
Member

Looks good.

@jrfnl
Copy link
Member Author

jrfnl commented Dec 25, 2021

Found yet another snippet which needed updating. Added a new commit with the additional change.

@jrfnl
Copy link
Member Author

jrfnl commented Jan 24, 2022

Anything I can do to move this PR forward ?

@Potherca
Copy link
Member

I was suffering from a severe lack of time, which has now been resolved. Will look into this the coming few days 👍

@Potherca Potherca merged commit 7451ccc into master Jan 25, 2022
@Potherca Potherca deleted the feature/ci-various-updates branch January 25, 2022 12:04
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.

2 participants