forked from jazzband/dj-database-url
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (49 loc) · 1.58 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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"]
django-version: ["3.2", "4.0", "4.1"]
exclude:
# 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"
# Python 3.11 is not compatible with 3.2
- python-version: "3.11"
django-version: "3.2"
# Python 3.11 is not compatible with 4.0
- python-version: "3.11"
django-version: "4.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 .