From 47efd42520097f43c44f5cf4c8628fa34949a3c2 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Sun, 23 Jun 2024 15:01:45 +0100 Subject: [PATCH] parallelize coverage see https://coveralls-python.readthedocs.io/en/latest/usage/configuration.html#github-actions-support --- .github/workflows/tests.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cd607d6..8600114 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: Coverage - run: | - pip install coveralls coverage-python-version - coveralls --service=github || true + - 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: 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