8
8
9
9
jobs :
10
10
11
- dist :
12
- runs-on : ubuntu-latest
13
- steps :
14
- - uses : actions/checkout@v3
15
- - uses : actions/setup-python@v4
16
- with :
17
- python-version : " 3.10"
18
- - run : sudo apt install gettext -y
19
- - run : python -m pip install --upgrade pip build wheel twine
20
- - run : make gettext
21
- - run : python -m build --sdist --wheel
22
- - run : python -m twine check dist/*
23
- - uses : actions/upload-artifact@v3
24
- with :
25
- path : dist/*
26
-
27
11
lint :
28
12
runs-on : ubuntu-latest
29
13
strategy :
@@ -38,82 +22,136 @@ jobs:
38
22
- uses : actions/checkout@v3
39
23
- uses : actions/setup-python@v4
40
24
with :
41
- python-version : " 3.10 "
25
+ python-version : " 3.x "
42
26
cache : ' pip'
43
27
cache-dependency-path : ' linter-requirements.txt'
44
28
- run : python -m pip install -r linter-requirements.txt
45
29
- run : ${{ matrix.lint-command }}
46
30
47
- pytest :
31
+ dist :
32
+ runs-on : ubuntu-latest
33
+ steps :
34
+ - uses : actions/checkout@v3
35
+ - uses : actions/setup-python@v4
36
+ with :
37
+ python-version : " 3.x"
38
+ - run : sudo apt install gettext -y
39
+ - run : python -m pip install --upgrade pip build wheel twine
40
+ - run : make gettext
41
+ - run : python -m build --sdist --wheel
42
+ - run : python -m twine check dist/*
43
+ - uses : actions/upload-artifact@v3
44
+ with :
45
+ path : dist/*
46
+
47
+ pytest-os :
48
+ name : PyTest
48
49
needs :
49
50
- lint
50
51
strategy :
51
52
matrix :
52
53
os :
53
54
- " ubuntu-latest"
55
+ - " macos-latest"
56
+ - " windows-latest"
57
+ runs-on : ${{ matrix.os }}
58
+ steps :
59
+ - uses : actions/checkout@v3
60
+ - name : Set up Python ${{ matrix.python-version }}
61
+ uses : actions/setup-python@v4
62
+ with :
63
+ python-version : " 3.x"
64
+ - run : python -m pip install .[test]
65
+ - run : python -m pytest
66
+ - uses : codecov/codecov-action@v3
67
+ with :
68
+ flags : ${{ matrix.os }}
69
+
70
+ pytest-python :
71
+ name : PyTest
72
+ needs :
73
+ - lint
74
+ strategy :
75
+ matrix :
54
76
python-version :
77
+ - " 3.8"
78
+ - " 3.9"
55
79
- " 3.10"
56
80
django-version :
57
81
- " 3.2" # LTS
58
- - " 4.0"
59
- - " 4.1"
60
- extras :
61
- - " test"
62
82
include :
63
- - os : " ubuntu-latest"
64
- python-version : " 3.8"
83
+ - python-version : " 3.11" # only Django 4.1+ supports Python 3.11
65
84
django-version : " 4.1"
66
- extras : " test"
67
- - os : " ubuntu-latest"
68
- python-version : " 3.9"
69
- django-version : " 4.1"
70
- extras : " test"
71
- - os : " macos-latest"
72
- python-version : " 3.10"
73
- django-version : " 3.2"
74
- extras : " test"
75
- - os : " windows-latest"
76
- python-version : " 3.10"
77
- django-version : " 3.2"
78
- extras : " test"
79
- - os : " ubuntu-latest"
80
- python-version : " 3.10"
81
- django-version : " 3.2"
82
- extras : " test,dramatiq"
83
- - os : " ubuntu-latest"
84
- python-version : " 3.10"
85
- django-version : " 3.2"
86
- extras : " test,celery"
87
- - os : " ubuntu-latest"
88
- python-version : " 3.10"
89
- django-version : " 3.2"
90
- extras : " test,drf"
91
- - os : " ubuntu-latest"
92
- python-version : " 3.10"
93
- django-version : " 3.2"
94
- extras : " test,cleanup"
85
+ runs-on : ubuntu-latest
86
+ steps :
87
+ - uses : actions/checkout@v3
88
+ - name : Set up Python ${{ matrix.python-version }}
89
+ uses : actions/setup-python@v4
90
+ with :
91
+ python-version : ${{ matrix.python-version }}
92
+ - run : python -m pip install .[test]
93
+ - run : python -m pip install django~=${{ matrix.django-version }}.0
94
+ - run : python -m pytest
95
+ - uses : codecov/codecov-action@v3
96
+ with :
97
+ flags : py${{ matrix.python-version }}
95
98
96
- runs-on : ${{ matrix.os }}
99
+ pytest-django :
100
+ name : PyTest
101
+ needs :
102
+ - lint
103
+ strategy :
104
+ matrix :
105
+ python-version :
106
+ - " 3.10" # only Django 4.1+ supports Python 3.11
107
+ django-version :
108
+ # LTS gets tested on all OS
109
+ - " 4.0"
110
+ - " 4.1"
111
+ runs-on : ubuntu-latest
97
112
steps :
98
- - uses : actions/checkout@v3
99
- - name : Set up Python ${{ matrix.python-version }}
100
- uses : actions/setup-python@v4
101
- with :
102
- python-version : ${{ matrix.python-version }}
103
- - name : Install redis
104
- if : matrix.os == 'ubuntu-latest'
105
- run : sudo apt-get install -y redis-server
106
- - run : python -m pip install .[${{ matrix.extras }}]
107
- - run : python -m pip install django~=${{ matrix.django-version }}.0
108
- - run : python -m pytest
109
- - uses : codecov/codecov-action@v3
110
- with :
111
- flags : ${{ matrix.os }}-py${{ matrix.python-version }}-dj${{ matrix.django-version }}-${{ matrix.extras }}
113
+ - uses : actions/checkout@v3
114
+ - name : Set up Python ${{ matrix.python-version }}
115
+ uses : actions/setup-python@v4
116
+ with :
117
+ python-version : ${{ matrix.python-version }}
118
+ - run : python -m pip install .[test]
119
+ - run : python -m pip install django~=${{ matrix.django-version }}.0
120
+ - run : python -m pytest
121
+ - uses : codecov/codecov-action@v3
122
+ with :
123
+ flags : dj${{ matrix.django-version }}
112
124
125
+ pytest-extras :
126
+ name : PyTest
127
+ needs :
128
+ - lint
129
+ strategy :
130
+ matrix :
131
+ extras :
132
+ - " celery"
133
+ - " dramatiq"
134
+ - " drf"
135
+ - " cleanup"
136
+ runs-on : ubuntu-latest
137
+ steps :
138
+ - uses : actions/checkout@v3
139
+ - name : Set up Python ${{ matrix.python-version }}
140
+ uses : actions/setup-python@v4
141
+ with :
142
+ python-version : 3.x
143
+ - name : Install redis
144
+ if : matrix.extras == 'dramatiq'
145
+ run : sudo apt-get install -y redis-server
146
+ - run : python -m pip install .[test,${{ matrix.extras }}]
147
+ - run : python -m pytest
148
+ - uses : codecov/codecov-action@v3
149
+ with :
150
+ flags : ${{ matrix.extras }}
113
151
114
152
codeql :
115
153
name : CodeQL
116
- needs : [ pytest ]
154
+ needs : [ dist, pytest-os, pytest-python, pytest-django, pytest-extras ]
117
155
runs-on : ubuntu-latest
118
156
permissions :
119
157
actions : read
0 commit comments