@@ -142,6 +142,73 @@ jobs:
142
142
with :
143
143
name : Python ${{ matrix.python-version }}
144
144
145
+ postgis :
146
+ runs-on : ubuntu-latest
147
+ strategy :
148
+ fail-fast : false
149
+ max-parallel : 5
150
+ matrix :
151
+ python-version : ['3.6', '3.7', '3.8', '3.9', '3.10']
152
+
153
+ services :
154
+ postgres :
155
+ image : postgis/postgis:14-3.1
156
+ env :
157
+ POSTGRES_DB : debug_toolbar
158
+ POSTGRES_USER : debug_toolbar
159
+ POSTGRES_PASSWORD : debug_toolbar
160
+ ports :
161
+ - 5432:5432
162
+ options : >-
163
+ --health-cmd pg_isready
164
+ --health-interval 10s
165
+ --health-timeout 5s
166
+ --health-retries 5
167
+
168
+ steps :
169
+ - uses : actions/checkout@v2
170
+
171
+ - name : Set up Python ${{ matrix.python-version }}
172
+ uses : actions/setup-python@v2
173
+ with :
174
+ python-version : ${{ matrix.python-version }}
175
+
176
+ - name : Get pip cache dir
177
+ id : pip-cache
178
+ run : |
179
+ echo "::set-output name=dir::$(pip cache dir)"
180
+
181
+ - name : Cache
182
+ uses : actions/cache@v2
183
+ with :
184
+ path : ${{ steps.pip-cache.outputs.dir }}
185
+ key :
186
+ ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.cfg') }}-${{ hashFiles('**/tox.ini') }}
187
+ restore-keys : |
188
+ ${{ matrix.python-version }}-v1-
189
+
190
+ - name : Install enchant (only for docs)
191
+ run : |
192
+ sudo apt-get -qq update
193
+ sudo apt-get -y install enchant
194
+
195
+ - name : Install dependencies
196
+ run : |
197
+ python -m pip install --upgrade pip
198
+ python -m pip install --upgrade tox tox-gh-actions
199
+
200
+ - name : Test with tox
201
+ run : tox
202
+ env :
203
+ DB_BACKEND : postgis
204
+ DB_HOST : localhost
205
+ DB_PORT : 5432
206
+
207
+ - name : Upload coverage
208
+ uses : codecov/codecov-action@v1
209
+ with :
210
+ name : Python ${{ matrix.python-version }}
211
+
145
212
sqlite :
146
213
runs-on : ubuntu-latest
147
214
strategy :
0 commit comments