CI/QA: Switch to GitHub Actions and start using Coveralls #252
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.
馃憠馃徎 In most repo's which have a similar setup, I normally have "quicktest" and a "test" workflow, where "quicktest" has a smaller matrix and is run on
push
events and the "test" workflow has the full matrix and is run onpull
events (and releases).This is done based on those repos having a
develop
and astable
branch. As this repo doesn't have that, I've not modularized the builds that way here.馃憠馃徎 You can see the results of these workflows on the "Actions tab".
馃憠馃徎 I'd recommend disconnecting the CircleCI integration in the Settings as otherwise the builds will always still show as failed (due to CircleCI not finding a configuration).
馃憠馃徎 The Coveralls configuration may need some tweaking. Suggested settings:
![image](https://user-images.githubusercontent.com/663378/170607654-87f0a0d4-7718-472a-8b15-0a28fd8f1bfc.png)
CI/QA: Remove CircleCI configuration
... and all work-arounds in place to accommodate. Hope I caught them all.
Composer.json - widen PHPUnit requirements
PHP 5.4 needs PHPUnit 4.x to be able to run the tests, so that needed adding.
Aside from that PHPUnit 9.x has come out quite a while back and has better support for PHP 8.0 and 8.1 than PHPUnit 8.x.
I've set the version constraints for the 4.x and 5.x series to very specific minimum versions for a reason: those are the first versions to have the forward-compatibility layer with the namespaced PHPUnit
TestCase
, which is used by the tests in this repo.CI/QA: add GH Actions workflows
This commit adds two workflows which run the same checks as were run in CircleCI + a lot more.
CS and QA workflow:
checkcs
jobDifferences between this workflow and these checks when run via CircleCI:
ruleset.xml
file.It will run two checks:
master
as an early warning system for upstream bugs.cs2pr
tool and thexmllint-problem-matcher
, violations found will be shown in the GH code views, like the "Files" tab on a PR.CS and QA workflow:
phpstan
jobDifferences between this workflow and these checks when run via CircleCI:
Test workflow:
test
jobIn this new setup, the tests are run against all supported PHP versions + the high/low supported PHPCS, which at this time means: PHPCS
3.5.6
as "low" and PHPCSdev-master
as "high".This results in a lot more test runs, but this will safeguard the cross-version compatibility of the standard much better as well (and GH Actions is fast, so it shouldn't really impact CI runtime anyway).
continue-on-error
).GH Actions/Test: add code coverage test runs & send to Coveralls
This commits:
composer.json
file for running the tests with code coverage and adjusts the existingtest
script to ignore code coverage.