Skip to content

Commit

Permalink
CI: parallelize the coverage calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme Deuchnord committed May 11, 2022
1 parent 9c9995e commit b8f184d
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,37 @@ jobs:
poetry install
- name: Run tests (with coverage)
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python_version == '3.10' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry run coverage run tests.py
poetry run coveralls --service=github
- name: Run tests (without coverage)
if: ${{ matrix.os != 'ubuntu-latest' || matrix.python_version != '3.10' }}
- name: Analyze coverage
run: |
make tests
poetry run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: "Py${{ matrix.python_version }}_${{ matrix.os }}"

coverage:
name: Push coverage report
needs: doc-tests
runs-on: ubuntu-latest

steps:
- name: Prepare Python
uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: Install dependencies
run: |
pip install -U pip poetry
poetry install
- name: Upload coverage report
run: |
poetry run coveralls --finish --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b8f184d

Please sign in to comment.