Dynamically create test matrix, take 2 #87
Merged
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.
Brings the matrix inline into the workflow instead of fetching it remotely from the repository.
Downside: No syntax highlighting
Upside: No need for a curl call; matrix is closer to the workflow, making it easier to grasp
Successfully tested by running this both correctly against this branch as well over at this repo
This is the second attempt at #78
The original description is below:
How it works:
Two new jobs are added to prepare the test matrix for the actual test jobs.
The full matrix is now in a JSON string. Is then processed by
jq
to filter out entries where the PHP version is belowminimum-php
. The test jobs then use this filtered matrix withfromJson
This way we avoid unused containers from being created.
Also excludes
testing.yml
from syncing.Example:
The final matrix for the unit tests will look something like this for
minimum-php = 7.0
:For the functional tests there are of course a few more keys:
Note I'm not super familiar with
jq
, so these commands can probably be improved.Aside: I also snuck a PHP 8.3 + WP trunk + SQLite test in there, which we previously didn't have.