Test on free-threaded builds of Python (#12798)

This commit is contained in:
Adam Turner 2024-08-18 02:10:57 +01:00 committed by GitHub
parent 67aed41940
commit 1fc780cd78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -102,6 +102,43 @@ jobs:
env:
PYTHONWARNINGS: "error" # treat all warnings as errors
deadsnakes-free-threraded:
runs-on: ubuntu-latest
name: Python ${{ matrix.python }} (Docutils ${{ matrix.docutils }}; free-threaded)
strategy:
fail-fast: false
matrix:
python:
- "3.13-dev"
docutils:
- "0.20"
- "0.21"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }} (deadsnakes)
uses: deadsnakes/action@v3.1.0
with:
python-version: ${{ matrix.python }}
nogil: true
- name: Check Python version
run: python --version --version
- name: Install graphviz
run: sudo apt-get install graphviz
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
- name: Install Docutils ${{ matrix.docutils }}
run: python -m pip install --upgrade "docutils~=${{ matrix.docutils }}.0"
# markupsafe._speedups has not declared that it can run safely without the GIL
- name: Remove markupsafe._speedups
run: rm -rf "$(python -c 'from markupsafe._speedups import __file__ as f; print(f)')"
- name: Test with pytest
run: python -m pytest -vv --durations 25
env:
PYTHONWARNINGS: "error" # treat all warnings as errors
windows:
runs-on: windows-2019
name: Windows