Multithreaded tests #11
This file contains hidden or 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
| --- | |
| # Runs tests suite with free threaded python. | |
| # | |
| ### | |
| name: Multithreaded tests | |
| on: | |
| push: | |
| branches: | |
| - ci/multithreaded | |
| schedule: | |
| - cron: "0 0 * * 1" | |
| # Allow job to be triggered manually from GitHub interface | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash | |
| # Force tox and pytest to use color | |
| env: | |
| FORCE_COLOR: true | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| multithreaded: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, ubuntu-latest] | |
| python-version: | |
| # Bump to latest version that we can install `[all]` on. | |
| - '3.14t' | |
| env: | |
| MODE: threaded | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| - name: Setup python | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| activate-environment: true | |
| - name: Display Python version | |
| run: python -c "import sys; print(sys.version)" | |
| - name: Install tox | |
| run: uv tool install -v tox --with=tox-uv --with=tox-gh-actions | |
| - name: Show tox config | |
| run: tox c | |
| - name: Setup test suite | |
| run: tox run -vv --notest --list-dependencies | |
| - name: Run test suite | |
| id: pre | |
| run: tox -v --skip-pkg-install --exit-and-dump-after 1200 | |
| - name: Create issue | |
| # Workflows triggered by schedule only notify the workflow creator | |
| # So let's open an issue to make sure this is visible to all | |
| if: ${{ steps.pre.outcome != 'success' }} | |
| uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run_id: ${{ github.run_id }} | |
| repository: ${{ github.repository }} | |
| workflow_name: MULTI-THREADED TESTS | |
| with: | |
| filename: .github/workflow_failure.md | |
| update_existing: true | |
| search_existing: open | |
| - name: Return failure | |
| if: ${{ steps.pre.outcome != 'success' }} | |
| run: exit 1 |