Skip to content

Commit 3ec13aa

Browse files
committed
Updating coveralls
1 parent da3c077 commit 3ec13aa

File tree

2 files changed

+29
-22
lines changed

2 files changed

+29
-22
lines changed

.github/workflows/test.yml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,36 @@ jobs:
2626
path: ${{ env.pythonLocation }}
2727
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }}
2828

29-
- name: Install
29+
- name: Install tox
3030
run: python -m pip install -U tox
3131

3232
- name: Test
3333
run: tox
3434

35-
- name: install coveralls
36-
run: pip install coveralls
37-
38-
- name: Generate coverage
39-
run: coverage run --include=iiif-presentation-validator.py setup.py test
40-
41-
- name: Upload coverage data to coveralls.io
42-
run: coveralls --service=github
43-
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
46-
COVERALLS_PARALLEL: true
35+
- name: Upload coverage to Coveralls
36+
uses: coverallsapp/github-action@v2
37+
with:
38+
github-token: ${{ secrets.GITHUB_TOKEN }}
39+
format: cobertura
40+
file: coverage.xml
41+
flag-name: ${{ matrix.python-version }}
42+
parallel: true
4743

48-
Coveralls:
44+
coveralls-finish:
4945
needs: build
5046
runs-on: ubuntu-latest
51-
container: python:3-slim
47+
if: ${{ always() }}
5248
steps:
53-
- name: Coveralls Finished
54-
run: |
55-
pip3 install --upgrade coveralls
56-
coveralls --service=github --finish
57-
env:
58-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
- name: Finish Coveralls parallel build
50+
uses: coverallsapp/github-action@v2
51+
with:
52+
github-token: ${{ secrets.GITHUB_TOKEN }}
53+
parallel-finished: true
54+
- name: Upload coverage to Coveralls
55+
uses: coverallsapp/github-action@v2
56+
with:
57+
github-token: ${{ secrets.GITHUB_TOKEN }}
58+
format: cobertura
59+
file: coverage.xml
60+
flag-name: ${{ matrix.python-version }}
61+
parallel: true

tox.ini

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
envlist = py
33

44
[testenv]
5+
deps =
6+
coverage
57
commands =
6-
python -m unittest discover -s tests -p "test*.py"
8+
coverage run -m unittest discover -s tests -p "test*.py"
9+
coverage xml
10+
coverage report -m

0 commit comments

Comments
 (0)