-
Notifications
You must be signed in to change notification settings - Fork 7
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
automatically determine php/server versions for phpunit #248
Conversation
7414d6b
to
5b06cb8
Compare
5b06cb8
to
5a94435
Compare
I just realized that with the existing actions mysql is the database that gets the full server/php version matrix, with sqlite,pgsql,oracle just getting the latest versions. Do we maybe want to switch this to only sqlite getting the full matrix? (as it is generally faster for ci runs) or should I adjust the PR to generate the mysql matrix instead? |
(see also #249 for more matrix generation) |
5a94435
to
1bb2769
Compare
Changed it to keep the matrices the same but just automatically determine the versions. We can adjust what database jobs run what matrix separately |
We switched it specifically away from sqlite, as sqlite allows too much BS (you can store a string in an int column without DB error, etc) In talk the difference is 12 seconds, ~50 for mysql with ~38 for sqlite. |
workflow-templates/phpunit-mysql.yml
Outdated
php-versions: ['8.0', '8.1', '8.2', '8.3'] | ||
server-versions: ['master'] | ||
php-versions: ${{fromJson(needs.matrix.outputs.php-versions)}} | ||
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does something like php-versions
also exist for server-"max"
so you can loop over all supported server branches?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want the full NxM
matrix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, just thinking how this can be used by apps that support multiple versions and currently run something like: https://github.com/nextcloud/quota_warning/blob/main/.github/workflows/phpunit-mysql.yml#L41-L51 (but yeah that one currently seems to do NxM)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switched to generating a matrix that covers all php and server versions with not-to-much™ redundancy.
The action itself now also generated the full NxM matrix (trimmed for supported versions) so we can easily switch to that if desired.
Signed-off-by: Robin Appelman <robin@icewind.nl>
1bb2769
to
4e2a158
Compare
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Automatically run sqlite tests against all server versions listed as supported in
info.xml
and the minimum supported php version for the server version.Example run: https://github.com/nextcloud/files_antivirus/actions/runs/6736095943
(also set
nextcloud/ocp
to not be installed as it is specific to server/php versions and only needed for psalm anyway)