From 7953d073e246c744733e35593fcdc66df8fac5fe Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 31 Mar 2022 11:02:27 +0200 Subject: [PATCH 1/6] ditch codecov codecov's new uploader cannot be used securely [1], so we take that opportunity to switch to something simpler. [1] https://github.com/codecov/codecov-action/issues/574 --- .github/workflows/main.yml | 6 ++---- README.md | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8041fde4..fa19f416 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,10 +53,8 @@ jobs: python-version: ${{ matrix.py }} - run: pip install tox - run: tox -e py -- -vvv - - uses: codecov/codecov-action@a1ed4b322b4b38cb846afb5a0ebfa17086917d27 - with: - file: ./coverage.xml - name: ${{ matrix.os }} + - run: python -m coverage report --fail-under=100 + if: matrix.py == '3.10.2' deploy: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') diff --git a/README.md b/README.md index 614d1ace..6434c1d6 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ pdoc

pdoc documentation -CI Status -Code Coverage +CI Status +Code Coverage PyPI Version -Supported Python Versions +Supported Python Versions

API Documentation for Python Projects. From caef5c0b6379eb6e51d9a63547672d05141c4fca Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 31 Mar 2022 11:27:50 +0200 Subject: [PATCH 2/6] simplify coverage assertion --- .github/workflows/main.yml | 7 ++++--- tox.ini | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa19f416..070cacf0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,10 +34,13 @@ jobs: include: - os: windows-latest py: 3.10.2 + coverage: --cov-fail-under=100 - os: macos-latest py: 3.10.2 + coverage: --cov-fail-under=100 - os: ubuntu-latest py: 3.10.2 + coverage: --cov-fail-under=100 - os: ubuntu-latest py: 3.9.9 - os: ubuntu-latest @@ -52,9 +55,7 @@ jobs: with: python-version: ${{ matrix.py }} - run: pip install tox - - run: tox -e py -- -vvv - - run: python -m coverage report --fail-under=100 - if: matrix.py == '3.10.2' + - run: tox -e py -- -vvv ${{ matrix.coverage }} deploy: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') diff --git a/tox.ini b/tox.ini index 43e2162b..6be93809 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ deps = -e . commands = pdoc --version - pytest --cov=pdoc --cov-config=tox.ini --cov-report xml --cov-report term-missing {posargs:-m "not slow"} + pytest --cov=pdoc --cov-config=tox.ini --cov-report term-missing {posargs:-m "not slow"} [testenv:flake8] commands = flake8 pdoc test {posargs} From b9f07b79543f03c62185d410d45c26ab19a05dd3 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 31 Mar 2022 11:32:28 +0200 Subject: [PATCH 3/6] move coverage check into condition --- .github/workflows/main.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 070cacf0..d2e1b769 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,13 +34,10 @@ jobs: include: - os: windows-latest py: 3.10.2 - coverage: --cov-fail-under=100 - os: macos-latest py: 3.10.2 - coverage: --cov-fail-under=100 - os: ubuntu-latest py: 3.10.2 - coverage: --cov-fail-under=100 - os: ubuntu-latest py: 3.9.9 - os: ubuntu-latest @@ -55,7 +52,7 @@ jobs: with: python-version: ${{ matrix.py }} - run: pip install tox - - run: tox -e py -- -vvv ${{ matrix.coverage }} + - run: tox -e py -- -vvv ${{ contains(['3.7.12','3.8.12','3.9.9'], matrix.py) && '' || '--cov-fail-under=100' }} deploy: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') From d3976ba6a45abeeef471b82a5a62450de9e5a1ca Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 31 Mar 2022 11:36:25 +0200 Subject: [PATCH 4/6] simplify --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2e1b769..648a90c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,10 @@ jobs: with: python-version: ${{ matrix.py }} - run: pip install tox - - run: tox -e py -- -vvv ${{ contains(['3.7.12','3.8.12','3.9.9'], matrix.py) && '' || '--cov-fail-under=100' }} + - run: tox -e py -- -vvv --cov-fail-under=100 + if: startsWith('3.10', matrix.py) + - run: tox -e py -- -vvv + if: !startsWith('3.10', matrix.py) deploy: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') From 29ae1a8c758bb46cfe54977f9d486d0226de91cc Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 31 Mar 2022 11:37:08 +0200 Subject: [PATCH 5/6] ?? --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 648a90c6..4edc140a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,7 +55,7 @@ jobs: - run: tox -e py -- -vvv --cov-fail-under=100 if: startsWith('3.10', matrix.py) - run: tox -e py -- -vvv - if: !startsWith('3.10', matrix.py) + if: ! startsWith('3.10', matrix.py) deploy: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') From 947b1f6edda85651d642f27949748aa95c6fb361 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 31 Mar 2022 11:37:43 +0200 Subject: [PATCH 6/6] ?? --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4edc140a..2aa95e24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,9 +53,9 @@ jobs: python-version: ${{ matrix.py }} - run: pip install tox - run: tox -e py -- -vvv --cov-fail-under=100 - if: startsWith('3.10', matrix.py) + if: matrix.py == '3.10.2' - run: tox -e py -- -vvv - if: ! startsWith('3.10', matrix.py) + if: matrix.py != '3.10.2' deploy: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')