1414 fail-fast : false
1515 max-parallel : 5
1616 matrix :
17- python-version : ['3.8', '3.9', '3.10', '3.11']
17+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12' ]
1818
1919 services :
2020 mariadb :
@@ -30,20 +30,21 @@ jobs:
3030 - 3306:3306
3131
3232 steps :
33- - uses : actions/checkout@v3
33+ - uses : actions/checkout@v4
3434
3535 - name : Set up Python ${{ matrix.python-version }}
36- uses : actions/setup-python@v4
36+ uses : actions/setup-python@v5
3737 with :
3838 python-version : ${{ matrix.python-version }}
39+ allow-prereleases : true
3940
4041 - name : Get pip cache dir
4142 id : pip-cache
4243 run : |
4344 echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
4445
4546 - name : Cache
46- uses : actions/cache@v3
47+ uses : actions/cache@v4
4748 with :
4849 path : ${{ steps.pip-cache.outputs.dir }}
4950 key :
@@ -65,26 +66,23 @@ jobs:
6566 DB_HOST : 127.0.0.1
6667 DB_PORT : 3306
6768
68- - name : Upload coverage data
69- uses : actions/upload-artifact@v3
70- with :
71- name : coverage-data
72- path : " .coverage.*"
7369
7470 postgres :
7571 runs-on : ubuntu-latest
7672 strategy :
7773 fail-fast : false
7874 max-parallel : 5
7975 matrix :
80- python-version : ['3.8', '3.9', '3.10', '3.11']
76+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12' ]
8177 database : [postgresql, postgis]
82- # Add psycopg3 to our matrix for 3.10 and 3.11
78+ # Add psycopg3 to our matrix for modern python versions
8379 include :
8480 - python-version : ' 3.10'
8581 database : psycopg3
8682 - python-version : ' 3.11'
8783 database : psycopg3
84+ - python-version : ' 3.12'
85+ database : psycopg3
8886
8987 services :
9088 postgres :
@@ -102,20 +100,21 @@ jobs:
102100 --health-retries 5
103101
104102 steps :
105- - uses : actions/checkout@v3
103+ - uses : actions/checkout@v4
106104
107105 - name : Set up Python ${{ matrix.python-version }}
108- uses : actions/setup-python@v4
106+ uses : actions/setup-python@v5
109107 with :
110108 python-version : ${{ matrix.python-version }}
109+ allow-prereleases : true
111110
112111 - name : Get pip cache dir
113112 id : pip-cache
114113 run : |
115114 echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
116115
117116 - name : Cache
118- uses : actions/cache@v3
117+ uses : actions/cache@v4
119118 with :
120119 path : ${{ steps.pip-cache.outputs.dir }}
121120 key :
@@ -140,35 +139,30 @@ jobs:
140139 DB_HOST : localhost
141140 DB_PORT : 5432
142141
143- - name : Upload coverage data
144- uses : actions/upload-artifact@v3
145- with :
146- name : coverage-data
147- path : " .coverage.*"
148-
149142 sqlite :
150143 runs-on : ubuntu-latest
151144 strategy :
152145 fail-fast : false
153146 max-parallel : 5
154147 matrix :
155- python-version : ['3.8', '3.9', '3.10', '3.11']
148+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12' ]
156149
157150 steps :
158- - uses : actions/checkout@v3
151+ - uses : actions/checkout@v4
159152
160153 - name : Set up Python ${{ matrix.python-version }}
161- uses : actions/setup-python@v4
154+ uses : actions/setup-python@v5
162155 with :
163156 python-version : ${{ matrix.python-version }}
157+ allow-prereleases : true
164158
165159 - name : Get pip cache dir
166160 id : pip-cache
167161 run : |
168162 echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
169163
170164 - name : Cache
171- uses : actions/cache@v3
165+ uses : actions/cache@v4
172166 with :
173167 path : ${{ steps.pip-cache.outputs.dir }}
174168 key :
@@ -187,53 +181,16 @@ jobs:
187181 DB_BACKEND : sqlite3
188182 DB_NAME : " :memory:"
189183
190- - name : Upload coverage data
191- uses : actions/upload-artifact@v3
192- with :
193- name : coverage-data
194- path : " .coverage.*"
195-
196- coverage :
197- name : Check coverage.
198- runs-on : " ubuntu-latest"
199- needs : [sqlite, mysql, postgres]
200- steps :
201- - uses : actions/checkout@v3
202- - uses : actions/setup-python@v4
203- with :
204- # Use latest, so it understands all syntax.
205- python-version : " 3.11"
206-
207- - run : python -m pip install --upgrade coverage[toml]
208-
209- - name : Download coverage data.
210- uses : actions/download-artifact@v3
211- with :
212- name : coverage-data
213-
214- - name : Combine coverage & check percentage
215- run : |
216- python -m coverage combine
217- python -m coverage html
218- python -m coverage report
219-
220- - name : Upload HTML report if check failed.
221- uses : actions/upload-artifact@v3
222- with :
223- name : html-report
224- path : htmlcov
225- if : ${{ failure() }}
226-
227184 lint :
228185 runs-on : ubuntu-latest
229186 strategy :
230187 fail-fast : false
231188
232189 steps :
233- - uses : actions/checkout@v3
190+ - uses : actions/checkout@v4
234191
235192 - name : Set up Python ${{ matrix.python-version }}
236- uses : actions/setup-python@v4
193+ uses : actions/setup-python@v5
237194 with :
238195 python-version : 3.8
239196
@@ -243,7 +200,7 @@ jobs:
243200 echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
244201
245202 - name : Cache
246- uses : actions/cache@v3
203+ uses : actions/cache@v4
247204 with :
248205 path : ${{ steps.pip-cache.outputs.dir }}
249206 key :
0 commit comments