Skip to content

Commit b02bf32

Browse files
committed
Add diff-cover check to Github Actions CI. Closes jaraco/skeleton#90.
1 parent 0484daa commit b02bf32

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,24 @@ jobs:
5353
- name: Run
5454
run: tox
5555

56+
diffcov:
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v3
60+
with:
61+
fetch-depth: 0
62+
- name: Setup Python
63+
uses: actions/setup-python@v4
64+
with:
65+
python-version: 3.x
66+
- name: Install tox
67+
run: |
68+
python -m pip install tox
69+
- name: Evaluate coverage
70+
run: tox
71+
env:
72+
TOXENV: diffcov
73+
5674
docs:
5775
runs-on: ubuntu-latest
5876
env:

tox.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ usedevelop = True
88
extras =
99
testing
1010

11+
[testenv:diffcov]
12+
deps =
13+
diff-cover
14+
commands =
15+
pytest {posargs} --cov-report xml
16+
diff-cover coverage.xml --compare-branch=origin/main --html-report diffcov.html
17+
diff-cover coverage.xml --compare-branch=origin/main --fail-under=100
18+
1119
[testenv:docs]
1220
extras =
1321
docs

0 commit comments

Comments
 (0)