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

Travis: only lint against high/low PHP and run tests on more PHP versions #158

Merged

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Mar 26, 2021

Context

  • Improve CI

Summary

This PR can be summarized in the following changelog entry:

  • Improve CI

Relevant technical choices:

As it was, the unit tests were only being run against PHP 7.4, while the plugin is supposed to be compatible with PHP 5.6 - 8.0.
To safeguard that properly, the tests should be run against all the supported PHP versions.

At this time, however, it is not (yet) possible to run the tests against PHP 8 due to the PHPUnit version being used (PHPUnit 5-7) in combination with certain tests features.
This will be fixed in the near future in a separate PR.

So, for now, this commit makes the following changes to the CI setup:

  • Run the tests against all currently supported PHP versions, with the exception of PHP 8.0 which will be enabled at a later point in time.
  • Only lint the code against high/low PHP versions, including against "future" PHP versions, like PHP 8.1 (nightly).
    As the tests are being run on all PHP versions, we don't really need to lint against all PHP versions anymore as most parse errors would be discovered by the tests anyhow. So linting against the highest and lowest supported PHP versions, including against PHP version for which the test runs are not yet enabled will be sufficient.

Test instructions

This PR can be tested by following these steps:

  • Verify that the Travis output logs to make sure linting and the tests are being run against the annotated PHP versions and that the tests pass.

…ions

As it was, the unit tests were only being run against PHP 7.4, while the plugin is supposed to be compatible with PHP 5.6 - 8.0.
To safeguard that properly, the tests should be run against all the supported PHP versions.

At this time, however, it is not (yet) possible to run the tests against PHP 8 due to the PHPUnit version being used (PHPUnit 5-7) in combination with certain tests features.
This will be fixed in the near future in a separate PR.

So, for now, this commit makes the following changes to the CI setup:
* Run the tests against all currently supported PHP versions, with the exception of PHP 8.0 which will be enabled at a later point in time.
* Only lint the code against high/low PHP versions, including against "future" PHP versions, like PHP 8.1 (nightly).
    As the tests are being run on all PHP versions, we don't really need to lint against all PHP versions anymore as most parse errors would be discovered by the tests anyhow. So linting against the highest and lowest supported PHP versions, including against PHP version for which the test runs are not yet enabled will be sufficient.
@enricobattocchi
Copy link
Member

Everything's working fine, merging

@enricobattocchi enricobattocchi merged commit e2eff8d into develop Mar 26, 2021
@enricobattocchi enricobattocchi deleted the feature/QA/travis-test-against-more-php-versions branch March 26, 2021 21:21
@jrfnl
Copy link
Contributor Author

jrfnl commented Mar 26, 2021

@enricobattocchi Oi! It's weekend. Those PRs could easily have waited till Monday ;-)

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