Add coverage reporting with codecov.

This commit is contained in:
Jannis Leidel 2022-05-24 15:14:46 +02:00
parent e83489749e
commit 683cfb0ee5
No known key found for this signature in database
GPG key ID: C795956FB489DCA9

View file

@ -16,19 +16,24 @@ jobs:
django-version: 4.0
fail-fast: false
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
pip install -U pip
pip install -U pip coverage
pip install "Django~=${{ matrix.django-version }}.0" .
- name: Run Tests
run: |
echo "$(python --version) / Django $(django-admin --version)"
python -m unittest discover
coverage run --source=dj_database_url --branch -m unittest discover
coverage report
coverage xml
- uses: codecov/codecov-action@v2