dj-database-url/.github/workflows/test.yml
Adam Johnson 742d74d091
Support Django 4.1 and remove compatibility code (#183)
* Support Django 4.1 and remove compatibility code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-25 21:49:01 +01:00

45 lines
1.4 KiB
YAML

name: test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
django-version: ["3.2", "4.0", "4.1"]
exclude:
# Python 3.6 is not compatible with 4.0
- python-version: "3.6"
django-version: "4.0"
# Python 3.6 is not compatible with 4.1
- python-version: "3.6"
django-version: "4.1"
# Python 3.7 is not compatible with 4.0
- python-version: "3.7"
django-version: "4.0"
# Python 3.7 is not compatible with 4.1
- python-version: "3.7"
django-version: "4.1"
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install "Django~=${{ matrix.django-version }}.0" .
- name: Run Tests
run: |
echo "$(python --version) / Django $(django-admin --version)"
coverage run --source=dj_database_url --branch -m unittest discover
coverage report
coverage xml
- uses: codecov/codecov-action@v2