Skip to content

Commit

Permalink
Switched to coverage v7 and the official Coveralls GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Sep 3, 2023
1 parent 94c5d28 commit b9af0ac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,25 @@ jobs:
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: pip install -e .[test] coveralls
run: pip install -e .[test]
env:
CFLAGS: "-UNDEBUG"
- name: Test with pytest
run: pytest
run: |
coverage run -m pytest -v
coverage xml
- name: Upload Coverage
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
uses: coverallsapp/github-action@v2
with:
parallel: true
file: coverage.xml

coveralls:
name: Finish Coveralls
needs: test
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
- name: Install dependencies
run: pip install coveralls
- name: Notify Coveralls
run: coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Documentation = "https://cbor2.readthedocs.org/en/latest/"

[project.optional-dependencies]
test = [
"coverage >= 7",
"pytest",
"hypothesis",
]
Expand Down

0 comments on commit b9af0ac

Please sign in to comment.