3636
3737 - name : List 'tests' nox sessions and required python versions
3838 id : set-matrix
39- run : echo "::set-output name= matrix:: $(nox -s gha_list -- -s tests -v)"
39+ run : echo "matrix= $(nox --json -l -s tests -v)" >> $GITHUB_OUTPUT
4040
4141 outputs :
4242 matrix : ${{ steps.set-matrix.outputs.matrix }} # save nox sessions list to outputs
@@ -60,14 +60,28 @@ jobs:
60606161
6262 - name : Install python ${{ matrix.nox_session.python }} for tests
63- 63+ # If one version fails, uncomment this one and the next step. For example here 3.13.
64+ if : ${{ ! contains(fromJson('["3.13"]'), matrix.nox_session.python ) }}
65+ 6466 id : set-py
6567 with :
6668 python-version : ${{ matrix.nox_session.python }}
6769 architecture : x64
6870 allow-build : info
6971 cache-build : true
7072
73+ - name : Install python ${{ matrix.nox_session.python }} for tests (3.13)
74+ if : contains(fromJson('["3.13"]'), matrix.nox_session.python )
75+ uses : actions/setup-python@v5
76+ id : set-py-latest
77+ with :
78+ # Include all versions including pre releases
79+ # See https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#specifying-a-python-version
80+ python-version : ${{ format('~{0}.0-alpha.0', matrix.nox_session.python) }}
81+ architecture : x64
82+ allow-build : info
83+ cache-build : true
84+
7185 - name : Install python 3.12 for nox
72867387 with :
87101
88102 # Share ./docs/reports so that they can be deployed with doc in next job
89103 - name : Share reports with other jobs
90- # if: matrix.nox_session == '...': not needed, if empty won't be shared
104+ if : runner.os == 'Linux'
9110592106 with :
93107 name : reports_dir
@@ -170,6 +184,9 @@ jobs:
170184171185 with :
172186 files : ./docs/reports/coverage/coverage.xml
187+ - name : \[not on TAG\] Build wheel and sdist
188+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/heads')
189+ run : nox -s build
173190
174191 # -------------- only on Ubuntu + TAG PUSH (no pull request) -----------
175192
@@ -181,7 +198,7 @@ jobs:
181198 # 8) Publish the wheel on PyPi
182199 - name : \[TAG only\] Deploy on PyPi
183200 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
184- uses : pypa/gh-action-pypi-publish@v1.8.11
201+ uses : pypa/gh-action-pypi-publish@release/v1
185202 with :
186203 user : __token__
187204 password : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments