moodlehq / moodle-plugin-ci

Helps running Moodle plugins analysis checks and tests under various CI environments.
https://moodlehq.github.io/moodle-plugin-ci/
GNU General Public License v3.0
46 stars 45 forks source link

Add support for MSSQL #302

Open justusdieckmann opened 5 months ago

justusdieckmann commented 5 months ago

Hey everyone,

this PR adds support for MSSQL (Fixes #92)

I tested it with our plugin tool_lifecycle here. The errors in the first commit are correct, since we used some MSSQL-incompatible syntax in the plugin. Those were addressed in the next two commits.

Justus

justusdieckmann commented 5 months ago

Sadly, there is no good way around the need for a password for the database with the official docker image, so I passed that to moodle-plugin-ci install only if matrix.database == 'sqlsrv'.

I have not looked into the .travis.dist.yml yet, since I am much more familiar with github actions.

Also, in the gha.dist.yml, I have completely replaced the ${{ matrix.extensions }} with sqlsrv, since extensions wasn't set anywhere.

I would be glad for any comments and opinions! :)

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.25%. Comparing base (783ec09) to head (0ddd3c9). Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
src/Installer/Database/MSSQLDatabase.php 93.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #302 +/- ## ============================================ + Coverage 88.22% 88.25% +0.03% - Complexity 734 738 +4 ============================================ Files 76 77 +1 Lines 2267 2282 +15 ============================================ + Hits 2000 2014 +14 - Misses 267 268 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.