Skip to content

Commit

Permalink
Add diff-cover check to Github Actions CI. Closes jaraco/skeleton#90.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Sep 10, 2023
1 parent 0484daa commit b02bf32
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@ jobs:
- name: Run
run: tox

diffcov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install tox
run: |
python -m pip install tox
- name: Evaluate coverage
run: tox
env:
TOXENV: diffcov

docs:
runs-on: ubuntu-latest
env:
Expand Down
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ usedevelop = True
extras =
testing

[testenv:diffcov]
deps =
diff-cover
commands =
pytest {posargs} --cov-report xml
diff-cover coverage.xml --compare-branch=origin/main --html-report diffcov.html
diff-cover coverage.xml --compare-branch=origin/main --fail-under=100

[testenv:docs]
extras =
docs
Expand Down

0 comments on commit b02bf32

Please sign in to comment.