From 9196c8b23645986481fd31a23a3fc21264adda54 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Sat, 22 Jun 2024 18:07:43 +0100 Subject: [PATCH 1/4] Make coverage report submission optional for test runs --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 566a2904..cd607d63 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,7 +49,7 @@ jobs: - name: Coverage run: | pip install coveralls coverage-python-version - coveralls --service=github + coveralls --service=github || true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d062c8907d862a9236eab1e45e550dd88dee42e9 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Sat, 22 Jun 2024 18:12:22 +0100 Subject: [PATCH 2/4] log changes --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 98cc95b0..27ddb442 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,7 +7,7 @@ Changelog Minor changes: - Test that all code works with both ``pytz`` and ``zoneinfo``. - +- Make coverage report submission optional for pull requests - Added missing public classes and functions to API documentation. Breaking changes: From 47efd42520097f43c44f5cf4c8628fa34949a3c2 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Sun, 23 Jun 2024 15:01:45 +0100 Subject: [PATCH 3/4] parallelize coverage see https://coveralls-python.readthedocs.io/en/latest/usage/configuration.html#github-actions-support --- .github/workflows/tests.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cd607d63..86001141 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,15 +43,30 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install tox + pip install tox coveralls coverage-python-version - name: Test run: tox -e ${{ matrix.config[1] }} + - name: Upload coverage data to coveralls.io + run: coveralls --service=github-actions || true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_REPO_TOKEN: ${{ secrets.CODECOV_TOKEN }} + COVERALLS_FLAG_NAME: ${{ matrix.config[1] }} + COVERALLS_PARALLEL: true + + coverage: + # parallel test coverage upload + # see https://coveralls-python.readthedocs.io/en/latest/usage/configuration.html#github-actions-support + name: Submit test coverage + needs: run-tests + runs-on: ubuntu-latest + container: python:3-slim + steps: - name: Coverage - run: | - pip install coveralls coverage-python-version - coveralls --service=github || true + run: coveralls --service=github-actions --finish || true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_REPO_TOKEN: ${{ secrets.CODECOV_TOKEN }} deploy-tag-to-pypi: # only deploy on tags, see https://stackoverflow.com/a/58478262/1320237 From 13d8a9fc3ffb2e692b5c2070ab4ee5fdf0ccb079 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Sun, 23 Jun 2024 15:10:40 +0100 Subject: [PATCH 4/4] install coverage dependencies --- .github/workflows/tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 86001141..e8d5f642 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -47,7 +47,7 @@ jobs: - name: Test run: tox -e ${{ matrix.config[1] }} - name: Upload coverage data to coveralls.io - run: coveralls --service=github-actions || true + run: coveralls --service=github-actions env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COVERALLS_REPO_TOKEN: ${{ secrets.CODECOV_TOKEN }} @@ -62,8 +62,10 @@ jobs: runs-on: ubuntu-latest container: python:3-slim steps: - - name: Coverage - run: coveralls --service=github-actions --finish || true + - name: Install dependencies + run: pip3 install --upgrade coveralls + - name: Upload coverage + run: coveralls --service=github-actions --finish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COVERALLS_REPO_TOKEN: ${{ secrets.CODECOV_TOKEN }}