Mentions légales du service

Skip to content

Compute coverage as part of CI/CD.

ANDREY Paul requested to merge coverage into develop

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