-
-
Notifications
You must be signed in to change notification settings - Fork 32
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: re-work the integration tests #221
GH Actions: re-work the integration tests #221
Conversation
This removes three keys from the integration test matrix in favour of adding steps for each of those options to the job. * The GitHub workspace is cleaned up between each run. * The Composer cache is removed between each run. This means that, in effect, the tests are being run in the same way as previously (clean install), but sequentially in one job instead of in parallel in different builds. This slims down the number of builds per run from 197 to 29.
This adds the `tests/fixtures/no-lock-file` and `tests/fixtures/out-of-sync-lock` working directories to the matrix for the integration tests to test these situations more thoroughly on each commit as well. Fixes 219
Add a job which tests "unclean" installs, i.e. running the action when there is already a `vendor` directory and a Composer `downloads` directory in place.
Codecov Report
@@ Coverage Diff @@
## v2 #221 +/- ##
=======================================
Coverage 98.29% 98.29%
=======================================
Files 5 5
Lines 117 117
=======================================
Hits 115 115
Misses 2 2 |
Note: the new "unclean" test run isn't very effective at the moment as the @ramsey Would you be open to changing the version constraint, either for the root project or for the On a loosely related note: should the |
This sounds good. I don't recall why I fixed it at 1.0.5.
Yep. It can be moved to Thanks so much for doing this work! 🎉 |
.. in the root `composer.json`.
0e35e1d
to
5477676
Compare
I've updated the PR (including the description) with the additional changes. Happy to help as this is such a useful action ;-) |
... to allow for installing a wider range of versions of the `ehime/hello-world` package. Includes locking the version for the `with-lock-file` test to `1.0.3` so there are higher and lower versions to switch to during the tests and switching the "unclean" test to use that fixture as a base.
5477676
to
a4633e0
Compare
(Sorry for the push noise, there was a weird hickup in the expect tests (in GHA, not related to these changes), so I pushed a non-change to force the tests to re-run) |
Thank you, Juliette! |
You're very welcome Ben! |
Description
GH Actions: re-work the integration tests
This removes three keys from the integration test matrix in favour of adding steps for each of those options to the job.
This means that, in effect, the tests are being run in the same way as previously (clean install), but sequentially in one job instead of in parallel in different builds.
This slims down the number of builds per run from 197 to 29.
GH Actions: run integration tests for additional situations
This adds the
tests/fixtures/no-lock-file
andtests/fixtures/out-of-sync-lock
working directories to the matrix for the integration tests to test these situations more thoroughly on each commit as well.Fixes #219
(Number of builds per run are now 53)
GH Actions: add extra job for unclean install test
Add a job which tests "unclean" installs, i.e. running the action when there is already a
vendor
directory and a Composerdownloads
directory in place.(Number of builds per run are now 57)
🆕 Composer: require-dev the package used for testing
.. in the root
composer.json
.🆕 Tests: update version constraints in test fixtures
... to allow for installing a wider range of versions of the
ehime/hello-world
package.Includes locking the version for the
with-lock-file
test to1.0.3
so there are higher and lower versions to switch to during the tests and switching the "unclean" test to use that fixture as a base.Motivation and context
See the discussion in #219
How has this been tested?
By running the action and doing a visual check that the output of various steps match the expected output.
Types of changes
PR checklist