Skip to content

add coverage in readme #18

add coverage in readme

add coverage in readme #18

Workflow file for this run

name: test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: pre-commit/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
tests:
name: Python ${{ matrix.python-version }} / Django ${{ matrix.django-version }}
runs-on: ubuntu-latest
needs: lint
strategy:
max-parallel: 4
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django-version: ["3.2", "4.2", "5.0", "5.1"]
exclude:
# Unsupported Python versions for Django 5.0
- python-version: "3.8"
django-version: "5.0"
- python-version: "3.9"
django-version: "5.0"
# Unsupported Python versions for Django 5.1
- python-version: "3.8"
django-version: "5.1"
- python-version: "3.9"
django-version: "5.1"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install -U pip coveralls Django~=${{ matrix.django-version }} djangorestframework
python -m pip install -e .
- name: Run Tests
run: |
coverage run tests/manage.py test testapp --failfast -v2
coverage report -m
- name: Upload coverage data to coveralls.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: run-${{ matrix.python-version }}
COVERALLS_PARALLEL: true
run: coveralls --service=github
finish:
name: Indicate completion to coveralls.io
needs: tests
runs-on: ubuntu-latest
steps:
- name: Finalize publishing to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true