smindel / silverstripe-gis

Adds support for geographic types.
BSD 3-Clause "New" or "Revised" License
9 stars 5 forks source link

Fix Unit Tests #33

Open gordonbanderson opened 2 years ago

gordonbanderson commented 2 years ago

hi,

The current unit tests, as per both Travis and Scrutinizer, are broken.

Travis: https://travis-ci.org/github/smindel/silverstripe-gis Scrutinizer: https://scrutinizer-ci.com/g/smindel/silverstripe-gis/inspections/d28923db-b14a-43e0-b7d9-6ad78ecc730b/log

I've been moving some of my modules to GitHub actions, and this one seemed like a good third party challenge in that it involves multiple databases and third party software (GDAL).

Tests are now passing, for each of MariaDB, MySQL and PostgreSQL, feel free to change the matrix of versions.

But some caveats regarding this PR, which I will outline either below, or by comments I have added to the PR where I see there are things to be fixed.

1) The tests rely on this working, https://github.com/gordonbanderson/actions/blob/main/.github/workflows/silverstripemodule.yml - happy to create a separate branch, tag, or for yourself to clone and reference that instead. I use it for some of my modules, and had to extend it significantly to overcome hurdles this module presented me (in a good way) 2) I have not dealt with SQLite as I am not familiar with it from a GIS point of view. A separate PR would probably be more appropriate. 3) I have applied SS coding standards over the codebase and added a check that will fail continuous integration if the standards check fail. 4) Added non failing CI checks for duplicate code and TODO statements 5) Tests now output coverage data, see https://codecov.io/gh/gordonbanderson/silverstripe-gis/tree/GITHUB_ACTIONS/src/Service for an example. 6) Badges will need changed in the README.

This is not ready to merge, but as tests are passing almost there. I look forward to your feedback

Cheers,

Gordon