Skip to content

Commit

Permalink
chore: upload coverage to codeclimate (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
xyb committed Mar 10, 2023
1 parent 5ea1923 commit ad117c7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- run: pip install -r requirements.txt
- run: pip install -r requirements-test.txt

- name: run tests
run: |
python manage.py test
make coverage
- name: Send coverage report to codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml

- name: Send coverage report to codeclimate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pre-commit:
pre-commit run --all-files

test: unittest

unittest:
pytest

coverage:
pytest --cov-report html --cov-report xml
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
DJANGO_SETTINGS_MODULE = drf_passwordless_jwt.settings
python_files = tests.py test_*.py *_tests.py
addopts = -ra --doctest-modules --last-failed --durations=3 --cov --cov-report term-missing
4 changes: 4 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r requirements.txt
pytest
pytest-django
pytest-coverage

0 comments on commit ad117c7

Please sign in to comment.