From d57bf84d9e66424d5d46f1d976c6e2b553069e60 Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Thu, 30 Jul 2026 16:42:01 +0200 Subject: [PATCH] ci: replace pytest-cov with coverage CLI --- .github/workflows/pytest.yml | 7 ++++++- THIRD-PARTY-LICENCES | 1 - pyproject.toml | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index ce8d54f7..64daa0ef 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -54,7 +54,11 @@ jobs: - name: Run Pytest with Coverage id: coverage - run: pytest --random-order --cov=bec_widgets --cov-config=pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail --ignore=tests/unit_tests/benchmarks tests/unit_tests/ + run: | + cd ./bec_widgets + coverage run --branch --source=./bec_widgets -m pytest --random-order --ignore=tests/unit_tests/benchmarks tests/unit_tests/ + coverage report + coverage xml -o coverage-unit.xml - name: Upload test artifacts uses: actions/upload-artifact@v4 @@ -69,3 +73,4 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} slug: bec-project/bec_widgets + files: ./bec_widgets/coverage-unit.xml diff --git a/THIRD-PARTY-LICENCES b/THIRD-PARTY-LICENCES index ed077088..a4d5c20b 100644 --- a/THIRD-PARTY-LICENCES +++ b/THIRD-PARTY-LICENCES @@ -22,7 +22,6 @@ Additional Dependencies (Testing/Development): - pytest-timeout: MIT License, see [here](https://github.com/pytest-dev/pytest-timeout/blob/main/LICENSE) - pytest-xvfb: MIT License, see [here](https://github.com/The-Compiler/pytest-xvfb/blob/master/LICENSE) - pytest: MIT License, see [here](https://github.com/pytest-dev/pytest/blob/main/LICENSE) -- pytest-cov: MIT License, see [here](https://github.com/pytest-dev/pytest-cov/blob/main/LICENSE) - watchdog: Apache License 2.0, see [here](https://github.com/gorakhargosh/watchdog/blob/master/LICENSE) - pre_commit: MIT License, see [here](https://github.com/pre-commit/pre-commit/blob/main/LICENSE) diff --git a/pyproject.toml b/pyproject.toml index c46f69e8..b7a34e95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,6 @@ dev = [ "pytest-timeout~=2.2", "pytest-xvfb~=3.0", "pytest~=8.0", - "pytest-cov~=6.1.1", "pytest-benchmark~=5.2", "watchdog~=6.0", "pre_commit~=4.2",