Skip to content

Commit

Permalink
👷 Fix Coveralls parallel reporting
Browse files Browse the repository at this point in the history
Handle aggregated Coveralls reports using the `COVERALLS_PARALLEL`
environment variable and the `--finish` flag. This prevents duplicate
report submissions in the workflow matrix, which sometimes led to
422 "Unprocessable Entity" errors during upload:
```
Error running coveralls: Could not submit coverage: 422 Client Error:
Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
```

Also updated the service name to `github-actions`, as suggested in:
- lemurheavy/coveralls-public#1607 (comment)
- https://coveralls-python.readthedocs.io/en/latest/usage/configuration.html#github-actions-support
  • Loading branch information
AndreMiras committed Jan 13, 2025
1 parent 9df700c commit 5f85f6d
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,24 @@ jobs:
run: tox
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github-actions
COVERALLS_FLAG_NAME: python-${{ matrix.python }}-${{ matrix.os }}
COVERALLS_PARALLEL: true
run: coveralls

Coveralls:
needs: Tests
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install coveralls
coveralls --finish
Docker:
runs-on: ubuntu-latest
steps:
Expand All @@ -55,4 +69,3 @@ jobs:
run: sphinx-build -b linkcheck docs/source docs/build
- name: Generate documentation
run: sphinx-build docs/source docs/build

0 comments on commit 5f85f6d

Please sign in to comment.