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

GH Actions/tests: make conditions more robust #183

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Aug 31, 2024

As things were, each script contained four different steps which ran the unit test with different settings depending on certain conditions. Some of those conditions were also duplicated across steps to account for specific situations, which makes adjusting them and keeping the conditions stable and correct is fiddly.

This commit tries to simplify this and make it more robust by adding a new "Determine PHPUnit config" step, which sets certain variables depending on various conditions.

This allows to have only one test run step, which uses the variables to pass the correct command.

This should simplify maintenance when new PHPUnit versions need to be supported, as only the "Determine PHPUnit config" step should need updating and the other steps should not need changes.

As things were, each script contained four different steps which ran the unit test with different settings depending on certain conditions. Some of those conditions were also duplicated across steps to account for specific situations, which makes adjusting them and keeping the conditions stable and correct is fiddly.

This commit tries to simplify this and make it more robust by adding a new "Determine PHPUnit config" step, which sets certain variables depending on various conditions.

This allows to have only one test run step, which uses the variables to pass the correct command.

This should simplify maintenance when new PHPUnit versions need to be supported, as only the "Determine PHPUnit config" step should need updating and the other steps should not need changes.
@jrfnl jrfnl added this to the 2.x Next milestone Aug 31, 2024
@coveralls
Copy link

Coverage Status

coverage: 95.833%. remained the same
when pulling cae8814 on feature/ghactions-make-the-test-workflow-more-robust
into ff06c9d on 2.x.

@jrfnl jrfnl merged commit 91e1a14 into 2.x Aug 31, 2024
158 checks passed
@jrfnl jrfnl deleted the feature/ghactions-make-the-test-workflow-more-robust branch August 31, 2024 01:11
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