1919
2020jobs :
2121 docs :
22- # Don't upgrade python version; there's a bug in 3.10 sphinx
2322 runs-on : ubuntu-latest
2423 steps :
2524 - uses : actions/checkout@v4
2625 - name : Set up Python
2726 uses : actions/setup-python@v4
27+ # Use python 3.10 for docs to match the version for the sphinx plugin
28+ # https://github.com/googleapis/synthtool/pull/1891
2829 with :
29- python-version : " 3.9 "
30+ python-version : " 3.10 "
3031 cache : ' pip'
3132 - name : Install nox.
3233 run : python -m pip install nox
3334 - name : Build the documentation.
3435 run : nox -s docs
3536 mypy :
37+ strategy :
38+ matrix :
39+ # Run mypy on all of the supported python versions listed in setup.py
40+ # https://github.com/python/mypy/blob/master/setup.py
41+ python : ["3.8", "3.9", "3.10", "3.11", "3.12"]
3642 runs-on : ubuntu-latest
3743 steps :
3844 - uses : actions/checkout@v4
39- - name : Set up Python "3.11 "
45+ - name : Set up Python "${{ matrix.python }} "
4046 uses : actions/setup-python@v4
4147 with :
42- python-version : " 3.11 "
48+ python-version : " ${{ matrix.python }} "
4349 cache : ' pip'
4450 - name : Install nox.
4551 run : python -m pip install nox
4652 - name : Check type annotations.
47- run : nox -s mypy
53+ run : nox -s mypy-${{ matrix.python }}
4854 showcase :
4955 strategy :
56+ # Run showcase tests on the lowest and highest supported runtimes
5057 matrix :
58+ python : ["3.7", "3.12"]
5159 target : [showcase, showcase_alternative_templates]
5260 runs-on : ubuntu-latest
5361 steps :
5462 - uses : actions/checkout@v4
55- - name : Set up Python "3.11 "
63+ - name : Set up Python "${{ matrix.python }} "
5664 uses : actions/setup-python@v4
5765 with :
58- python-version : " 3.11 "
66+ python-version : " ${{ matrix.python }} "
5967 cache : ' pip'
6068 - name : Install system dependencies.
6169 run : |
8189 unzip protoc-${PROTOC_VERSION}.zip
8290 sudo ln -s /usr/src/protoc/bin/protoc /usr/local/bin/protoc
8391 - name : Run showcase tests.
84- run : nox -s ${{ matrix.target }}
92+ run : nox -s ${{ matrix.target }}-${{ matrix.python }}
8593 showcase-mtls :
8694 if : ${{ false }} # TODO(dovs): reenable when #1218 is fixed
8795 strategy :
@@ -95,10 +103,10 @@ jobs:
95103 run : |
96104 sudo mkdir -p /tmp/workspace/tests/cert/
97105 sudo chown -R ${USER} /tmp/workspace/
98- - name : Set up Python "3.11 "
106+ - name : Set up Python "3.12 "
99107 uses : actions/setup-python@v4
100108 with :
101- python-version : " 3.11 "
109+ python-version : " 3.12 "
102110 cache : ' pip'
103111 - name : Copy mtls files
104112 run : cp tests/cert/mtls.* /tmp/workspace/tests/cert/
@@ -131,7 +139,7 @@ jobs:
131139 showcase-unit :
132140 strategy :
133141 matrix :
134- python : ["3.7", "3.8", "3.9", "3.10", "3.11"]
142+ python : ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
135143 variant : ['', _alternative_templates, _mixins, _alternative_templates_mixins]
136144 runs-on : ubuntu-latest
137145 steps :
@@ -161,10 +169,10 @@ jobs:
161169 runs-on : ubuntu-latest
162170 steps :
163171 - uses : actions/checkout@v4
164- - name : Set up Python "3.11 "
172+ - name : Set up Python "3.12 "
165173 uses : actions/setup-python@v4
166174 with :
167- python-version : " 3.11 "
175+ python-version : " 3.12 "
168176 cache : ' pip'
169177 - name : Install system dependencies.
170178 run : |
@@ -189,10 +197,10 @@ jobs:
189197 variant : ['', _alternative_templates]
190198 steps :
191199 - uses : actions/checkout@v4
192- - name : Set up Python "3.11 "
200+ - name : Set up Python "3.12 "
193201 uses : actions/setup-python@v4
194202 with :
195- python-version : " 3.11 "
203+ python-version : " 3.12 "
196204 cache : ' pip'
197205 - name : Install system dependencies.
198206 run : |
@@ -214,10 +222,10 @@ jobs:
214222 runs-on : ubuntu-latest
215223 steps :
216224 - uses : actions/checkout@v4
217- - name : Set up Python "3.11 "
225+ - name : Set up Python "3.12 "
218226 uses : actions/setup-python@v4
219227 with :
220- python-version : " 3.11 "
228+ python-version : " 3.12 "
221229 cache : ' pip'
222230 - name : Install system dependencies.
223231 run : |
@@ -230,7 +238,7 @@ jobs:
230238 unit :
231239 strategy :
232240 matrix :
233- python : ["3.7", "3.8", "3.9", "3.10", "3.11"]
241+ python : ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
234242 runs-on : ubuntu-latest
235243 steps :
236244 - uses : actions/checkout@v4
@@ -251,7 +259,7 @@ jobs:
251259 fragment :
252260 strategy :
253261 matrix :
254- python : ["3.7", "3.8", "3.9", "3.10", "3.11"]
262+ python : ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
255263 variant : ['', _alternative_templates]
256264 runs-on : ubuntu-latest
257265 steps :
@@ -303,28 +311,30 @@ jobs:
303311 runs-on : ubuntu-latest
304312 steps :
305313 - uses : actions/checkout@v4
306- - name : Set up Python 3.11
314+ - name : Set up Python 3.12
307315 uses : actions/setup-python@v4
308316 with :
309- python-version : " 3.11 "
317+ python-version : " 3.12 "
310318 cache : ' pip'
311319 - name : Install nox.
312320 run : |
313321 python -m pip install nox
314322 - name : Run blacken and lint on the generated output.
315323 run : |
316- nox -f tests/integration/goldens/asset/noxfile.py -s mypy-3.11 blacken lint_setup_py lint
317- nox -f tests/integration/goldens/credentials/noxfile.py -s mypy-3.11 blacken lint_setup_py lint
318- nox -f tests/integration/goldens/eventarc/noxfile.py -s mypy-3.11 blacken lint_setup_py lint
319- nox -f tests/integration/goldens/logging/noxfile.py -s mypy-3.11 blacken lint_setup_py lint
320- nox -f tests/integration/goldens/redis/noxfile.py -s mypy-3.11 blacken lint_setup_py lint
324+ nox -f tests/integration/goldens/asset/noxfile.py -s mypy-3.12 blacken lint
325+ nox -f tests/integration/goldens/credentials/noxfile.py -s mypy-3.12 blacken lint
326+ nox -f tests/integration/goldens/eventarc/noxfile.py -s mypy-3.12 blacken lint
327+ nox -f tests/integration/goldens/logging/noxfile.py -s mypy-3.12 blacken lint
328+ nox -f tests/integration/goldens/redis/noxfile.py -s mypy-3.12 blacken lint
321329 style-check :
322330 runs-on : ubuntu-latest
323331 steps :
324332 - uses : actions/checkout@v4
325333 - name : Set up Python "3.11"
326334 uses : actions/setup-python@v4
327335 with :
336+ # Do not upgrade this check to python 3.12 until
337+ # https://github.com/hhatto/autopep8/issues/712 is fixed
328338 python-version : " 3.11"
329339 cache : ' pip'
330340 - name : Install autopep8
0 commit comments