Skip to content

Add Coveralls integration #4

Add Coveralls integration

Add Coveralls integration #4

Workflow file for this run

on: ["push", "pull_request"]
jobs:
test:
runs-on: ubuntu-latest
strategy:
# all supported django version on lowest/highest supported python
# see https://www.djangoproject.com/download/#supported-versions
# and https://docs.djangoproject.com/en/4.2/faq/install/#what-python-version-can-i-use-with-django
matrix:
include:
- { dj: "4.1.*", py: "3.8" }
- { dj: "4.1.*", py: "3.11" }
- { dj: "4.2.*", py: "3.8" }
- { dj: "4.2.*", py: "3.12" }
- { dj: "5.0.*", py: "3.10" }
- { dj: "5.0.*", py: "3.12" }
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Install test deps
run: pip install flake8 coverage
- name: Install django
run: pip install django==${{ matrix.dj }}
- name: Install library
run: pip install -e .
# Disabled for now, at some point we'll use black instead
# - name: Lint
# run: flake8 --ignore=E501
- name: Run tests
working-directory: example
run: python -m coverage run manage.py test
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true