66
77env :
88 PYTHON_VERSION : " 3.10"
9- POETRY_VERSION : " 1.5 .1"
9+ POETRY_VERSION : " 1.7 .1"
1010jobs :
1111 # Run our linter on every push to the repository.
1212 lint :
1313 runs-on : ubuntu-latest
1414 steps :
1515 - name : get code
16- uses : actions/checkout@v3
16+ uses : actions/checkout@v4
1717 - name : install python
1818 uses : actions/setup-python@v4
1919 with :
3838 runs-on : ubuntu-latest
3939 steps :
4040 - name : get code
41- uses : actions/checkout@v3
41+ uses : actions/checkout@v4
4242 - name : install python
4343 uses : actions/setup-python@v4
4444 with :
7272 working-directory : docs/
7373 steps :
7474 - name : Get code
75- uses : actions/checkout@v3
75+ uses : actions/checkout@v4
7676 - name : Setup npm
7777 uses : actions/setup-node@v3
7878 with :
8888 runs-on : ubuntu-latest
8989 steps :
9090 - name : get code
91- uses : actions/checkout@v3
91+ uses : actions/checkout@v4
9292 - name : install python
9393 uses : actions/setup-python@v4
9494 with :
@@ -107,42 +107,57 @@ jobs:
107107
108108 # Run integration tests against the API (only on the main branch, though). The comprehensive
109109 # version runs a matrix of python versions for better coverage.
110+ # This tests runs on
111+ # - merges to main
112+ # - releases
113+ # - branch names ending with "-fulltest"
110114 test-comprehensive :
111- if : github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
115+ if : >-
116+ github.ref == 'refs/heads/main' ||
117+ startsWith(github.ref, 'refs/tags/v') ||
118+ endsWith(github.ref, '-fulltest')
112119 needs :
113120 - test-simple
114121 - test-docs
115122 runs-on : ubuntu-latest
116123 strategy :
117- # It's totally debatable which is better here: fail-fast or not.
118- # Failing fast will use fewer cloud resources, in theory.
119- # But if the tests are slightly flaky (fail to pip install something)
120- # Then one flaky install kills lots of jobs that need to be redone.
121- # So the efficiency argument has its limits
122- # Failing slow is clearer about what's going on.
123- # This is pretty unambiguous, so we're going with it for now.
124+ # fail-fast=false works best for flaky tests with manual "retry failed".
125+ # Of course we should get rid of the race conditions that make these tests flaky.
126+ # Some AI lied to me and said I could just put "max-retry" here but you can't.
124127 fail-fast : false
125128 matrix :
126129 python-version : [
127130 # "3.6", # Default on Ubuntu18.04 but openapi-generator fails
128- " 3.7" ,
131+ " 3.7" , # EOL but we're still supporting it for now.
129132 " 3.8" ,
130133 " 3.9" ,
131134 " 3.10" ,
132135 " 3.11" ,
136+ " 3.12" ,
133137 ]
134138 install_extras : [true, false]
135139 steps :
136140 - name : get code
137- uses : actions/checkout@v3
138- - name : install python
141+ uses : actions/checkout@v4
142+ - name : install modern python for poetry
139143 uses : actions/setup-python@v4
140144 with :
141- python-version : ${{ matrix.python-version }}
145+ # We use this python to install poetry -- we choose a modern version
146+ python-version : ${{ env.PYTHON_VERSION }}
142147 - name : install poetry
143148 uses : snok/install-poetry@v1
144149 with :
145150 version : ${{ env.POETRY_VERSION }}
151+ - name : install python for python-sdk venv
152+ uses : actions/setup-python@v4
153+ with :
154+ # We use this python for the sdk venv
155+ python-version : ${{ matrix.python-version }}
156+ - name : choose python version ${{ matrix.python-version }}
157+ run : |
158+ # set the environment to use the matrix python version
159+ poetry env use python${{ matrix.python-version }}
160+ poetry run python --version
146161 - name : show python version ${{ matrix.python-version }}
147162 run : |
148163 poetry run python --version
@@ -170,7 +185,7 @@ jobs:
170185 runs-on : ubuntu-latest
171186 steps :
172187 - name : get code
173- uses : actions/checkout@v3
188+ uses : actions/checkout@v4
174189 with :
175190 ref : ${{ github.head_ref }}
176191 - name : install python
@@ -219,7 +234,7 @@ jobs:
219234 working-directory : docs/
220235 steps :
221236 - name : Get code
222- uses : actions/checkout@v3
237+ uses : actions/checkout@v4
223238 - name : Install poetry
224239 uses : snok/install-poetry@v1
225240 with :
@@ -268,7 +283,7 @@ jobs:
268283 POETRY_PYPI_TOKEN_PYPI : ${{ secrets.PYPI_PUBLISH_TOKEN }}
269284 steps :
270285 - name : get code
271- uses : actions/checkout@v3
286+ uses : actions/checkout@v4
272287 - name : install python
273288 uses : actions/setup-python@v4
274289 with :
0 commit comments