@@ -28,11 +28,11 @@ jobs:
2828 strategy :
2929 fail-fast : false
3030 matrix :
31- python-version : [pypy-3.10, pypy-3.11, '3.10', '3.11', '3.12', '3.13', '3.14.0', '3.14.0-freethreaded' ]
31+ python-version : [pypy-3.10, pypy-3.11, '3.10', '3.11', '3.12', '3.13', '3.14.0']
3232 os : [
3333 ubuntu-22.04,
3434 windows-2022,
35- macos-13 ,
35+ macos-14 ,
3636 ]
3737 steps :
3838 - uses : actions/checkout@v4
@@ -142,3 +142,82 @@ jobs:
142142 - name : Run mypy
143143 run : mypy json2xml tests
144144
145+ test-freethreaded :
146+ runs-on : ${{ matrix.os }}
147+ strategy :
148+ fail-fast : false
149+ matrix :
150+ include :
151+ - os : ubuntu-22.04
152+ python-version : ' 3.14.0'
153+ arch : x64
154+ platform : linux
155+ - os : windows-2022
156+ python-version : ' 3.14.0'
157+ arch : x64
158+ platform : win32
159+ - os : macos-14
160+ python-version : ' 3.14.0'
161+ arch : x64
162+ platform : darwin
163+ steps :
164+ - uses : actions/checkout@v4
165+ with :
166+ persist-credentials : false
167+
168+ - name : Download and setup Python ${{ matrix.python-version }} (freethreaded)
169+ run : |
170+ if [ "${{ matrix.platform }}" = "linux" ]; then
171+ wget -O python.tar.gz "https://github.com/actions/python-versions/releases/download/3.14.0-18313368925/python-3.14.0-linux-22.04-${{ matrix.arch }}-freethreaded.tar.gz"
172+ tar -xzf python.tar.gz
173+ echo "$PWD/python-3.14.0-linux-22.04-${{ matrix.arch }}-freethreaded/bin" >> $GITHUB_PATH
174+ elif [ "${{ matrix.platform }}" = "win32" ]; then
175+ curl -L -o python.zip "https://github.com/actions/python-versions/releases/download/3.14.0-18313368925/python-3.14.0-win32-${{ matrix.arch }}-freethreaded.zip"
176+ Expand-Archive python.zip -DestinationPath .
177+ echo "$PWD/python-3.14.0-win32-${{ matrix.arch }}-freethreaded" >> $env:GITHUB_PATH
178+ elif [ "${{ matrix.platform }}" = "darwin" ]; then
179+ curl -L -o python.tar.gz "https://github.com/actions/python-versions/releases/download/3.14.0-18313368925/python-3.14.0-darwin-${{ matrix.arch }}-freethreaded.tar.gz"
180+ tar -xzf python.tar.gz
181+ echo "$PWD/python-3.14.0-darwin-${{ matrix.arch }}-freethreaded/bin" >> $GITHUB_PATH
182+ fi
183+
184+ - name : Install uv
185+ uses : astral-sh/setup-uv@v6
186+ with :
187+ enable-cache : true
188+ cache-dependency-glob : |
189+ requirements*.txt
190+ requirements-dev.in
191+ pyproject.toml
192+
193+ - name : Install dependencies
194+ run : |
195+ uv pip install --system -e .
196+ uv pip install --system pytest pytest-xdist pytest-cov
197+
198+ - name : Create coverage directory
199+ run : mkdir -p coverage/reports
200+
201+ - name : Run tests with freethreaded Python
202+ run : |
203+ pytest --cov=json2xml --cov-report=xml:coverage/reports/coverage.xml --cov-report=term -xvs tests -n auto
204+ env :
205+ PYTHONPATH : ${{ github.workspace }}
206+ PYTHON_FREETHREADED : 1
207+
208+ - name : Upload coverage to Codecov
209+ uses : codecov/codecov-action@v5
210+ if : success()
211+ with :
212+ directory : ./coverage/reports/
213+ env_vars : OS,PYTHON
214+ fail_ci_if_error : false # Don't fail CI if codecov upload fails
215+ files : ./coverage/reports/coverage.xml
216+ flags : freethreaded
217+ token : ${{ secrets.CODECOV_TOKEN }}
218+ name : codecov-freethreaded
219+ verbose : true
220+ env :
221+ OS : ${{ matrix.os }}
222+ PYTHON : ${{ matrix.python-version }}-freethreaded
223+
0 commit comments