Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: switch to Coveralls' first-party GitHub Action #2551

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Sample conf file from http://nedbatchelder.com/code/coverage/config.html
[run]
source = sopel
include =
sopel/*
branch = True
omit =
sopel/web.py
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,16 @@ jobs:
run: make lint
- name: Run pytest
run: make test_norecord
- name: Generate XML coverage report
# Coveralls reporter doesn't understand branch coverage in .coverage DB
# and conversion to LCOV doesn't work right either
run: coverage xml
- 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
file: coverage.xml

coveralls:
if: ${{ github.repository_owner == 'sopel-irc' }}
Expand All @@ -55,11 +59,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
Loading