Skip to content

Commit d9f8edc

Browse files
committed
github/workflows/test: only run coverage once
Coveralls requires a special setup for multiple builds. However, coverage should be the same for all Python versions, so only run it once.
1 parent c19865b commit d9f8edc

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ jobs:
3737
- uses: actions/checkout@v3
3838
- run: poetry install --only=main --only=test
3939
- run: poetry run pytest
40+
if: matrix.python-version != '3.10'
4041
- run: poetry run coverage run
41-
- run: |
42-
pipx install coveralls
43-
pipx inject coveralls coverage[toml]
44-
- run: coveralls --service=github
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
if: matrix.python-version == '3.10'
43+
- run: poetry run coverage xml
44+
if: matrix.python-version == '3.10'
45+
- uses: coverallsapp/github-action@v2
46+
if: matrix.python-version == '3.10'
47+
with:
48+
file: coverage.xml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,5 @@ demo/_*.py
6565

6666
# Coveage
6767
.coverage
68+
coverage.*
6869
htmlcov/

0 commit comments

Comments
 (0)