-
Notifications
You must be signed in to change notification settings - Fork 1
115 lines (108 loc) · 3.18 KB
/
test.yaml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Test
on:
push:
branches:
- main
paths:
- '.github/workflows/test.yaml'
- 'src/**'
- 'test/**'
- 'pyproject.toml'
- 'tox.ini'
pull_request:
paths:
- '.github/workflows/test.yaml'
- 'src/**'
- 'test/**'
- 'pyproject.toml'
- 'tox.ini'
schedule:
- cron: '33 16 * * 3' # https://crontab.guru/#33_16_*_*_3
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
COLUMNS: "120"
FORCE_COLOR: "1"
PYTHONUNBUFFERED: "1"
jobs:
test:
name: Test django${{ matrix.django }}-py${{ matrix.py }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { py: "3.12", django: "50" }
- { py: "3.12", django: "42" }
- { py: "3.11", django: "50" }
- { py: "3.11", django: "42" }
- { py: "3.11", django: "41" }
- { py: "3.10", django: "50" }
- { py: "3.10", django: "42" }
- { py: "3.10", django: "41" }
- { py: "3.10", django: "40" }
- { py: "3.10", django: "32" }
- { py: "3.9", django: "42" }
- { py: "3.9", django: "41" }
- { py: "3.9", django: "40" }
- { py: "3.9", django: "32" }
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: "3.12"
- run: python -m pip install tox
- name: Setup python for test ${{ matrix.py }} - django${{ matrix.django }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.py }}
- name: Setup test suite
run: tox -e django${{ matrix.django }}-py${{ matrix.py }} -vv --notest
- name: Run test suite
run: tox -e django${{ matrix.django }}-py${{ matrix.py }} --skip-pkg-install
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
fail_ci_if_error: true
name: codecov-py${{ matrix.py }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
main:
runs-on: ubuntu-latest
name: Test django_main
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: "3.12"
- run: python -m pip install tox
- name: Setup python for test 3.12 - django main branch
uses: actions/[email protected]
with:
python-version: "3.12"
- name: Setup test suite
run: tox -e django_main -vv --notest
- name: Run test suite
run: tox -e django_main --skip-pkg-install
static-typing:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: '3.9'
- run: pip install tox
- name: Run mypy
run: tox -e mypy
check-migrations:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: '3.9'
- run: pip install tox
- name: Check migrations
run: tox -e check-migrations