Skip to content

Commit

Permalink
ci: switch to Coveralls' first-party GitHub Action
Browse files Browse the repository at this point in the history
Dropped `coveralls` dev-requirement in favor of using the `coverage`
package directly, and upgraded it to the latest release series (7.x).

The `line_bits` table in .coverage (SQLite DB of results, generated by
`coverage`) isn't populated. coverallsapp/coverage-reporter tries an SQL
query against the database based on this empty table, and fails because
there aren't any coverage results to upload.

We work around this by having `coverage lcov` generate a file format
that the reporter can understand.
  • Loading branch information
dgw committed Nov 10, 2023
1 parent 16871a7 commit 7b712ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ jobs:
run: make lint
- name: Run pytest
run: make test_norecord
- name: Generate lcov coverage report
run: coverage lcov
- name: Upload coverage data to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
uses: coverallsapp/github-action@v2
with:
flag-name: ${{ matrix.python-version }}
parallel: true

coveralls:
if: ${{ github.repository_owner == 'sopel-irc' }}
Expand All @@ -55,11 +56,9 @@ jobs:
name: Finalize job on coveralls.io
needs: tests
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Notify coveralls.io
run: |
pip install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: all
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# These are requirements to develop Sopel itself.
coveralls>=2.0
coverage~=7.0
flake8>=5
flake8-coding
flake8-future-import
Expand Down

0 comments on commit 7b712ea

Please sign in to comment.