From 68f9a7ec08e02818eca6a1c4f3cc6ec2f8ec196f Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 10 Oct 2023 22:07:25 +0200 Subject: [PATCH] CI: Add code coverage reporting --- .github/workflows/main.yml | 9 +++++++++ .gitignore | 2 ++ pyproject.toml | 6 ++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c0615e6d..edbec345 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,3 +50,12 @@ jobs: - name: Run linter and software tests run: | poe check + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: ./coverage.xml + flags: unittests + env_vars: OS,PYTHON + name: codecov-umbrella + fail_ci_if_error: false diff --git a/.gitignore b/.gitignore index 48a7cb41..d4bde8fd 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ .eggs __pycache__ dist +.coverage +coverage.xml diff --git a/pyproject.toml b/pyproject.toml index 990adc2d..301ba5a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -146,8 +146,10 @@ install_types = true non_interactive = true [tool.pytest.ini_options] -#addopts = "-rA --verbosity=3 --cov --cov-report=term-missing --cov-report=xml" -addopts = "-rA --verbosity=3" +addopts = """ + -rfEX -p pytester --strict-markers --verbosity=3 + --cov --cov-report=term-missing --cov-report=xml + """ minversion = "2.0" log_level = "DEBUG" log_cli_level = "DEBUG"