-
Notifications
You must be signed in to change notification settings - Fork 229
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
Setup CI #192
base: main
Are you sure you want to change the base?
Setup CI #192
Conversation
It's 0% for all of 5.x recently, so perhaps we could use PHPUnit 8 and include PHP 7&8 instead of PHP 5&7? I'm OK with leaving things as is ( |
I think we should have PHP 7 as the minimum requirement. We may need to add a note to the readme explaining how users can still use the class with PHP 5 (for all install methods mentioned). |
Great! Upgraded to PHPUnit 8 (and as a consequence to PHP 7.2) in d54d18a |
I figured that we can still allow PHP 5 and only run tests for supported PHP versions ( |
I've added integration tests in eefcb65 which test against every minor version of PHP starting from 7.2 and all UniFi Network Application versions available as Docker images. This currently translates into the following matrix:
|
@sgrodzicki It would be good to revisit this topic again. I haven't looked into this in great detail but what would the general flow be? Also, how do we determine which controller and site the tests are executed a against for the assertions? |
The test matrix is defined in |
Thanks. Looking at the results and the setup of the tests it looks as if you're assuming the localhost is running MongoDB and we have an account with given username and password. Could we obtain the credentials and URL from a file that is outside of source control? Then restrict the tests to the login and other methods. Forgive the ignorant questions; I'm not that familiar yet with PHP testing 😉 |
This setup is meant to run on GitHub Actions but it could certainly be adjusted to run somewhere else (though Docker would be almost identical). Those credentials are defaults from the core components. |
Okay, understood. Will dive into this next year 😉 |
FYI, we've bumped PHP requirement to 7.4 😉 |
Node.js 16 actions are deprecated
Upgraded to PHP 7.4 and updated dependencies (GitHub Actions & UniFi versions) |
As mentioned in #169 (comment) this is the foundation for setting up unit tests (to be extended with integration tests).
Probably the most controversial is the bump to PHP 5.6, which is due to the supported versions of the testing framework. On the other hand, PHP 5 has not been supported for a long time, so this is, in my opinion, a good time to move at least a little bit closer to the current supported versions of PHP.