Skip to content

Commit 93adfbf

Browse files
committed
Enable test coverage
1 parent 141328b commit 93adfbf

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.github/workflows/main.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,20 @@ jobs:
6565
pytest tests/test_manifests.py --tests=./specifications/json-ld-api/tests --loader=${{ matrix.loader }}
6666
pytest tests/test_manifests.py --tests=./specifications/json-ld-framing/tests --loader=${{ matrix.loader }}
6767
pytest tests/test_manifests.py --tests=./specifications/normalization/tests --loader=${{ matrix.loader }}
68-
pytest --ignore ./tests/test_manifests.py
68+
pytest --ignore ./tests/test_manifests.py --cov=pyld --cov-report xml:./coverage.xml --cov-report=term
6969
env:
7070
LOADER: ${{ matrix.loader }}
71-
#coverage:
72-
# needs: [test]
73-
# FIXME
71+
- name: Upload coverage report
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: coverage-${{ matrix.python-version }}
75+
path: ./coverage.xml
76+
coverage:
77+
runs-on: ubuntu-latest
78+
needs: test
79+
steps:
80+
- name: Get Cover
81+
uses: orgoro/coverage@v3.2
82+
with:
83+
coverageFile: ./coverage.xml
84+
token: ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ install:
44
pip install -e .
55

66
test:
7-
pytest
7+
pytest --cov=pyld
88

99
upgrade-submodules:
1010
git submodule update --remote --init --recursive

requirements-test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
ruff
22
pytest
3+
pytest-cov

0 commit comments

Comments
 (0)