Skip to content

Introduce Python and C++ code coverage reports and checks#262

Merged
chinmayshah99 merged 3 commits intoOpenMined:devfrom
alejandrosame:code-coverage
Aug 22, 2020
Merged

Introduce Python and C++ code coverage reports and checks#262
chinmayshah99 merged 3 commits intoOpenMined:devfrom
alejandrosame:code-coverage

Conversation

@alejandrosame
Copy link
Copy Markdown
Member

@alejandrosame alejandrosame commented Aug 21, 2020

Description

This PR implements #256 and #257. The current minimum coverage requirement for the CI check is 80%, which is specified by the MIN_COVERAGE variable inside .env file. The Makefile has the following new actions:

  • check-coverage-python: ensures that Python code coverage is at least MIN_COVERAGE%. Automatically called by make test.
  • check-coverage-cpp: ensures that C++ code coverage is at least MIN_COVERAGE%. Automatically called by make test.
  • show-coverage: collects coverage data generated during test execution and opens its report on a browser tab [see image below].
    cov_html_report

Affected Dependencies

Added the following python dependencies:

  • coverage to generate Python coverage reports.
  • gcovr to generate C++ coverage reports.

How has this been tested?

  • make test executed succesfully
  • CI changes tested in a test PR.

Checklist

Comment thread .github/workflows/tests.yml Outdated
@chinmayshah99 chinmayshah99 merged commit 47209af into OpenMined:dev Aug 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants