Compute coverage as part of CI/CD.
This MR is about adding coverage statistics' computation and reporting to our CI/CD pipelines.
It implements the following changes:
- Add 'pytest-cov' (hence, indirectly, 'coverage') to third-party dependencies of test environments.
- Add configuration of 'coverage' in 'pyproject.toml' to properly target declearn code (excluding protobuf-based code as well as the
test_utils
submodule) and be compatible with the use of multiprocessing in some functional~integration tests. - Add coverage collection and xml reporting in 'tox.ini', notably via pytest instructions.
- Add 'coverage.xml' file to CI/CD pipelines' artifacts.
- This should be sufficient to display coverage statistics via GitLab-provided tools of the repository.
- In the future, it should be possible to extend the CI/CD configuration so that the coverage is exported to a GitLab Pages website, and possibly fetched back into our README so as to display a cool badge.
Merge request reports
Activity
added automation label
assigned to @paandrey
added 1 commit
- 99a378d7 - Disable running 'test_routines.py' in CI/CD to avoid random failures.
As far as I can tell, the suggested configuration tweaks work. The integration to GitLab is still to be tested, but I am unsure whether it is achievable without merging to develop.
I disabled one of our functional tests. While its contents are covered by more advanced integration~functional tests, to me it underlines the need for writing proper unit tests for network communication endpoints. I will try to get around it next week (and open a dedicated MR), and the present MR may either be merged prior to or following it.
added 46 commits
-
99a378d7...34779af9 - 43 commits from branch
develop
- c8e04ad0 - Configure coverage tool with 'pyproject.toml'.
- a5eedd4a - Add coverage computation to 'tox.ini'.
- d6fe02b4 - Add coverage collection to GitLab CI/CD.
Toggle commit list-
99a378d7...34779af9 - 43 commits from branch
enabled an automatic merge when the pipeline for d6fe02b4 succeeds
mentioned in commit 1bf6a11b