@@ -128,7 +128,6 @@ jobs:
128
128
file : ./coverage.xml
129
129
130
130
sqlite :
131
-
132
131
runs-on : ubuntu-latest
133
132
env :
134
133
DATABASE : sqlite
@@ -166,3 +165,69 @@ jobs:
166
165
- name : Run Full Unit Tests
167
166
run : |
168
167
poetry run pytest --cov-fail-under=95
168
+
169
+ mysql :
170
+ runs-on : ubuntu-latest
171
+ env :
172
+ DATABASE : mysql
173
+ MYSQL_PASSWORD : password
174
+ MYSQL_USER : root
175
+ MYSQL_HOST : localhost
176
+ MYSQL_PORT : 3306
177
+ strategy :
178
+ matrix :
179
+ python-version : [ '3.7', '3.11']
180
+ mysql-version : ['5.7', 'latest']
181
+ django-version :
182
+ - ' Django~=3.2.0' # LTS April 2024
183
+ - ' Django~=4.2.0' # LTS April 2026
184
+ exclude :
185
+ - python-version : ' 3.7'
186
+ django-version : ' Django~=4.2.0'
187
+ - python-version : ' 3.11'
188
+ django-version : ' Django~=3.2.0'
189
+ - python-version : ' 3.7'
190
+ mysql-version : ' latest'
191
+ - python-version : ' 3.11'
192
+ mysql-version : ' 5.7'
193
+
194
+ services :
195
+ mysql :
196
+ # Docker Hub image
197
+ image : mysql:${{ matrix.mysql-version }}
198
+ # Provide the password for mysql
199
+ env :
200
+ MYSQL_ROOT_PASSWORD : password
201
+ MYSQL_DATABASE : test
202
+ # Set health checks to wait until mysql has started
203
+ options : >-
204
+ --health-cmd mysqladmin ping
205
+ --health-interval 10s
206
+ --health-timeout 5s
207
+ --health-retries 5
208
+ ports :
209
+ # Maps tcp port 3306 on service container to the host
210
+ - 3306:3306
211
+
212
+ steps :
213
+ - uses : actions/checkout@v2
214
+ - uses : actions/setup-node@v2
215
+ - name : Set up Python ${{ matrix.python-version }}
216
+ uses : actions/setup-python@v2
217
+ with :
218
+ python-version : ${{ matrix.python-version }}
219
+
220
+ - name : Install Poetry
221
+ uses : snok/install-poetry@v1
222
+ with :
223
+ virtualenvs-create : true
224
+ virtualenvs-in-project : true
225
+ - name : Install Dependencies
226
+ run : |
227
+ poetry config virtualenvs.in-project true
228
+ poetry run pip install --upgrade pip
229
+ poetry install -E all --with mysql
230
+ poetry run pip install -U "${{ matrix.django-version }}"
231
+ - name : Run Full Unit Tests
232
+ run : |
233
+ poetry run pytest --cov-fail-under=95
0 commit comments