Update setup.py #72
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
django-version: ["3.2", "4.2", "5.0"] | |
exclude: | |
# Python 3.7 is not compatible with 4.1 | |
- python-version: "3.7" | |
django-version: "4.2" | |
# Python 3.11 is not compatible with 3.2 | |
- python-version: "3.11" | |
django-version: "3.2" | |
- python-version: "3.12" | |
django-version: "3.2" | |
# django 5.0 is not compatible with python 3.9 or lower | |
- python-version: "3.7" | |
django-version: "5.0" | |
- python-version: "3.8" | |
django-version: "5.0" | |
- python-version: "3.9" | |
django-version: "5.0" | |
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 mypy | |
run: | | |
python -m mypy dj_database_url | |
- name: Run Tests | |
run: | | |
echo "$(python --version) / Django $(django-admin --version)" | |
coverage run --source=dj_database_url --branch -m unittest discover -v | |
coverage report | |
coverage xml | |
- uses: codecov/codecov-action@v3 | |
- name: Check mypy types installation | |
run: | | |
pip install . | |
cd tests | |
python -m mypy . |