Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1102212?usp=email )
Change subject: tests: omit pytest-cov and use coverage only ......................................................................
tests: omit pytest-cov and use coverage only
This also prevents duplicate coverage reports
Change-Id: Ib356bede27659524e9abfa125b789ddd27251fd5 --- M .github/workflows/pywikibot-ci.yml M .github/workflows/sysop_write_tests-ci.yml M dev-requirements.txt 3 files changed, 2 insertions(+), 4 deletions(-)
Approvals: Xqt: Verified; Looks good to me, approved jenkins-bot: Verified
diff --git a/.github/workflows/pywikibot-ci.yml b/.github/workflows/pywikibot-ci.yml index 0c9e7da..b43d943 100644 --- a/.github/workflows/pywikibot-ci.yml +++ b/.github/workflows/pywikibot-ci.yml @@ -128,7 +128,7 @@ if [ ${{matrix.site || 0}} != 'wikisource:zh' ]; then coverage run -m unittest discover -vv -p "*_tests.py"; else - pytest --cov=.; + coverage run -m pytest fi
- name: Show coverage statistics diff --git a/.github/workflows/sysop_write_tests-ci.yml b/.github/workflows/sysop_write_tests-ci.yml index a840945..309f65a 100644 --- a/.github/workflows/sysop_write_tests-ci.yml +++ b/.github/workflows/sysop_write_tests-ci.yml @@ -65,7 +65,7 @@ PYWIKIBOT_TEST_WRITE: ${{ matrix.site == 'wikipedia:test' && 1 || 0 }} run: | python pwb.py version - pytest -s -r A -a "${{ matrix.attr }}" --cov=.; + coverage -m pytest -s -r A -a "${{ matrix.attr }}"
- name: Upload coverage to Codecov uses: codecov/codecov-action@v4 diff --git a/dev-requirements.txt b/dev-requirements.txt index 5e95f84..542a558 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,8 +2,6 @@ #
pytest >= 7.0.1 -pytest-cov >= 3.0.0; python_version>="3.10" -pytest-cov >= 2.11.1; python_version<"3.10" pytest-subtests != 0.14.0 pytest-attrib>=0.1.3 pytest-xvfb>=3.0.0
pywikibot-commits@lists.wikimedia.org