ci: implement and visualise test coverage
WHY IS THIS CHANGE NEEDED?:
- CI pipeline doesn't show code coverage of tests, therefore we can't evaluate how well the tests are at addressing potential issues
HOW DOES THE CHANGE SOLVE THE PROBLEM?:
- chiefly taken from https://git.ecdf.ed.ac.uk/help/user/project/merge_requests/test_coverage_visualization.md#python-example but with some functions run under poetry for consistency
WHAT SIDE EFFECTS DOES THIS CHANGE HAVE?:
- specific to GitLab 14.2.6 which we use. coverage reports are handled differently in 15.0 and later versions: https://gitlab.com/gitlab-org/gitlab/-/blob/812408bafae328b81652110fc53c6c6b89e3db81/doc/ci/yaml/artifacts_reports.md#artifactsreportscoverage_report
EVIDENCE THAT COMMIT WORKS:
- Some sort of coverage report is now produced from aliby, see: https://git.ecdf.ed.ac.uk/swain-lab/aliby/aliby/-/jobs/56307
REFERENCES:
- issue #46 (closed)
Edited by Arin Wongprommoon