diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f94f874..3d6ceed 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,18 +19,25 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - if: ${{ !endsWith(matrix.python-version, 't') }} + if: ${{ !endsWith(matrix.python-version, 't') && matrix.python-version != '3.13' }} with: python-version: ${{ matrix.python-version }} - - uses: deadsnakes/action@6c8b9b82fe0b4344f4b98f2775fcc395df45e494 # v3.1.0 + - name: Setup free-threaded variables if: ${{ endsWith(matrix.python-version, 't') }} + run: | + echo "FREE_THREADED=1" >> "$GITHUB_ENV" + + - uses: deadsnakes/action@6c8b9b82fe0b4344f4b98f2775fcc395df45e494 # v3.1.0 + if: ${{ endsWith(matrix.python-version, 't') || matrix.python-version == '3.13' }} with: python-version: "3.13" - nogil: true + nogil: ${{ env.FREE_THREADED == '1' }} - name: Install tox run: pip install tox - name: Test + env: + PYTHON_GIL: ${{ env.FREE_THREADED != '1' }} run: tox -e py