Skip to content

Commit

Permalink
feat(tests): Add new Makefile target + CI job for codecov.io upload
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpovel committed Aug 8, 2022
1 parent a43ce73 commit d451c28
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ jobs:
- name: Run tests
run: make test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: coverage.xml

- name: Run type checks
run: make typecheck

Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ tests: test typecheck formatcheck isortcheck
alltests: tests image

test:
${RUN} pytest
${RUN} pytest \
--cov=${LIBRARY} \
--cov-report=html \
--cov-report=term \
--cov-report=xml

typecheck:
${RUN} mypy -p ${LIBRARY}
Expand Down

0 comments on commit d451c28

Please sign in to comment.