diff --git a/.cirrus.yml b/.cirrus.yml index e07f20e53..55d9492fa 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,11 +3,13 @@ # SPDX-License-Identifier: MIT test_template: &test + environment: + CODECOV_TOKEN: ENCRYPTED[e18180139fa0a70726bb6f8dfbbc9fd53da36e6a4d2b449e30f99a255fdfdab63863117e8b6665deb06dd99d95e5aaad] test_script: - command -v python3 - python3 --version - - python3 -m pip install .[test] - - python3 -m pytest + - python3 -m pip install .[test] pytest-codecov + - python3 -m pytest --showlocals -vv --cov --cov-report=xml:coverage-$CIRRUS_TASK_NAME.xml --codecov alpine-3_task: container: diff --git a/pyproject.toml b/pyproject.toml index b0c55a038..949e5994c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,6 +104,18 @@ known_first_party = 'mesonpy' disable_warnings = [ 'couldnt-parse', ] +source = ['.'] +omit = [ + 'tests/packages/*', +] + +[tool.coverage.report] +ignore_errors = true +exclude_lines = [ + '\#\s*pragma: no cover', # we need this because this field overrides the default + '^\s*raise NotImplementedError\b', + '^\sif typing.TYPE_CHECKING', +] [tool.coverage.html] show_contexts = true