move TLS up one document "level" #57
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
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| tags: ["*"] | |
| pull_request: | |
| branches: [master] | |
| schedule: | |
| # Monthly on the 1st at 4:30 AM UTC | |
| - cron: "30 4 1 * *" | |
| workflow_dispatch: | |
| env: | |
| FORCE_COLOR: "1" | |
| PIP_DISABLE_PIP_VERSION_CHECK: "1" | |
| jobs: | |
| lint: | |
| name: ${{ matrix.label }} | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # docformatter on 3.13 (not yet compatible with 3.14) | |
| - python-version: "3.13" | |
| toxenv: docformatter_check | |
| label: docformatter | |
| # All other linting tools on 3.13 | |
| - python-version: "3.13" | |
| toxenv: flake8,flake8_tests,isort_check,pydocstyle,pylint,codespell | |
| label: Linting | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install tox | |
| run: python -Im pip install tox | |
| - name: Run linting | |
| run: python -Im tox -e ${{ matrix.toxenv }} | |
| tests: | |
| name: Python ${{ matrix.python-version }} (${{ matrix.os }})${{ matrix.asyncio-debug && ' [asyncio-debug]' || '' }}${{ matrix.optional && ' [OPTIONAL]' || '' }} | |
| continue-on-error: ${{ matrix.optional || false }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| python-version: | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| include: | |
| # Python 3.14 pre-release (Linux + Windows) | |
| - os: ubuntu-latest | |
| python-version: "3.14" | |
| - os: windows-latest | |
| python-version: "3.14" | |
| # Python 3.14 with asyncio debug mode | |
| - os: ubuntu-latest | |
| python-version: "3.14" | |
| asyncio-debug: true | |
| # Python 3.15 pre-release (optional) | |
| - os: ubuntu-latest | |
| python-version: "3.15" | |
| optional: true | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| cache: pip | |
| - name: Prepare tox environment name | |
| shell: bash | |
| run: | | |
| V=${{ matrix.python-version }} | |
| V=py$(echo $V | tr -d .) | |
| echo TOX_ENV=$V >> $GITHUB_ENV | |
| - name: Install tox | |
| run: python -Im pip install tox | |
| - name: Run tests | |
| run: python -Im tox -e ${{ env.TOX_ENV }} | |
| env: | |
| PYTHONASYNCIODEBUG: ${{ matrix.asyncio-debug && '1' || '' }} | |
| - name: Rename coverage data | |
| if: ${{ !matrix.asyncio-debug }} | |
| shell: bash | |
| run: | | |
| if test -f .coverage; then | |
| mv .coverage{,.${{ matrix.os }}.${{ env.TOX_ENV }}} | |
| fi | |
| - name: Upload coverage data | |
| if: ${{ !matrix.asyncio-debug }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-data-${{ matrix.os }}-${{ matrix.python-version }} | |
| path: .coverage.* | |
| include-hidden-files: true | |
| if-no-files-found: ignore | |
| coverage: | |
| name: Combine & check coverage | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| cache: pip | |
| - name: Download coverage data | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: coverage-data-* | |
| merge-multiple: true | |
| - name: Combine coverage data | |
| run: | | |
| python -Im pip install coverage[toml] | |
| python -Im coverage combine | |
| python -Im coverage html --skip-covered --skip-empty | |
| python -Im coverage xml | |
| python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| verbose: true | |
| docs: | |
| name: Build documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install tox | |
| run: python -Im pip install tox | |
| - name: Build docs | |
| run: python -Im tox -e docs |