TST: ensure GIL is disabled in free-threading concurrency tests #516
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI (bleeding edge) | |
on: | |
schedule: | |
# run this every wednesday at 3 am UTC | |
- cron: 0 3 * * 3 | |
pull_request: | |
paths: | |
- .github/workflows/bleeding_edge.yml | |
workflow_dispatch: | |
jobs: | |
build: | |
name: py${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.13' | |
- 3.13+freethreaded | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0 | |
- name: Set PYTHON_GIL | |
if: ${{ endswith( matrix.python-version , '+freethreaded' ) }} | |
run: | | |
echo "PYTHON_GIL=0" >> $GITHUB_ENV | |
- name: Build | |
run: | | |
uv venv -p ${{ matrix.python-version }} --python-preference only-managed | |
uv pip install . | |
- run: uv pip list | |
- name: Run tests | |
run: | | |
uv run -p ${{ matrix.python-version }} --group test \ | |
pytest --color=yes --doctest-modules | |
- name: Run concurrency tests | |
run: | | |
uv run -p ${{ matrix.python-version }} --group test --group concurrency \ | |
pytest --color=yes --count 100 tests/test_concurrent.py |