Skip to content

Commit

Permalink
Report code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
bauersimon committed Dec 22, 2023
1 parent 25f0d54 commit 2571141
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/extractor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ jobs:
- name: Test
run: make test
working-directory: ./extractor
- name: Coverage
uses: orgoro/coverage@v3.1
with:
coverageFile: extractor/coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}

9 changes: 7 additions & 2 deletions extractor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,17 @@ lint:
$(VENV)pyright tests/
.PHONY: lint

test:
$(VENV)python -m unittest discover
test: clean
$(VENV)coverage run --source=extractor -m unittest discover
$(VENV)coverage report
$(VENV)coverage html
$(VENV)coverage xml
@if [ -z "$(IS_CI)" ]; then xdg-open htmlcov/index.html &> /dev/null; fi
.PHONY: test

clean:
find -name "__pycache__" -exec rm -rv {} +
rm -rf .coverage .ruff_cache htmlcov coverage.xml
.PHONY: clean

uninstall:
Expand Down
3 changes: 2 additions & 1 deletion extractor/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ tqdm
autopep8
isort
ruff
pyright
pyright
coverage

0 comments on commit 2571141

Please sign in to comment.