From 107fdd78b013ff96c4b3d4b2f359b627fb405142 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Mon, 9 Sep 2024 21:30:01 +1200 Subject: [PATCH] ci: update the TIOBE reporting for the changes in coverage calculation (#1367) We recently changed `tox -e unit` to not produce a coverage report. This PR adjust the TIOBE workflow to account for that - running `tox -e coverage` instead. Since this will now be one of the main uses for that command, I've also moved the `coverage xml` command into the tox steps rather than being in the workflow, and adjusted the `.gitignore` accordingly. --- .github/workflows/tiobe.yaml | 3 +-- .gitignore | 1 + tox.ini | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tiobe.yaml b/.github/workflows/tiobe.yaml index 6456792a8..6c79c229f 100644 --- a/.github/workflows/tiobe.yaml +++ b/.github/workflows/tiobe.yaml @@ -18,8 +18,7 @@ jobs: run: pip install tox~=4.2 coverage[toml] flake8 pylint websocket-client==1.* pyyaml==6.* pytest~=7.2 pytest-operator~=0.23 - name: Generate coverage report run: | - tox -e unit - coverage xml + tox -e coverage # Annoyingly, the coverage.xml file needs to be in a .coverage folder. rm .coverage mkdir .coverage diff --git a/.gitignore b/.gitignore index 30a07a5b6..c8b24c7d0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ venv /docsenv .vscode .coverage +coverage.xml /.tox .*.swp diff --git a/tox.ini b/tox.ini index 72a4c6256..2c7a2496d 100644 --- a/tox.ini +++ b/tox.ini @@ -113,6 +113,7 @@ deps = commands = coverage run --source={[vars]src_path} \ -m pytest --ignore={[vars]tst_path}smoke -v --tb native {posargs} + coverage xml coverage report [testenv:pebble]