diff --git a/.coveragerc b/.coveragerc index f23c5159b..55e833f0c 100644 --- a/.coveragerc +++ b/.coveragerc @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8b7d05b6..4755a4826 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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' }} @@ -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 diff --git a/dev-requirements.txt b/dev-requirements.txt index 39c25f980..3b6ea72d8 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,5 @@ # These are requirements to develop Sopel itself. -coveralls>=2.0 +coverage~=7.0 flake8>=5 flake8-coding flake8-future-import