Compile with mypyc
#631
Workflow file for this run
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: | ||
| - main | ||
| pull_request: | ||
| merge_group: | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| DEFAULT_PYTHON: "3.14" | ||
| jobs: | ||
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - &checkout | ||
| name: Check out the repository | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 2 | ||
| - &setup-python | ||
| name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: ${{ env.DEFAULT_PYTHON }} | ||
| check-latest: true | ||
| - &setup-uv | ||
| name: Install UV | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| enable-cache: true | ||
| version-file: "pyproject.toml" | ||
| - name: Install dependencies | ||
| run: uv sync --all-extras --frozen | ||
| - name: Lint | ||
| run: uv run --with tox-uv tox -e lint | ||
| build: | ||
| if: github.repository_owner == 'PyCQA' | ||
| name: Build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - *checkout | ||
| - *setup-python | ||
| - *setup-uv | ||
| - name: Build package and wheel | ||
| env: | ||
| HATCH_BUILD_HOOK_ENABLE_MYPYC: false | ||
| run: uv build | ||
| - name: Build package and compiled wheel | ||
| env: | ||
| HATCH_BUILD_HOOK_ENABLE_MYPYC: true | ||
| run: uv build | ||
| test: | ||
| name: Tests | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"] | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| compiled: [true, false] | ||
| runs-on: ${{ matrix.os }} | ||
| env: | ||
| FORCE_COLOR: 1 | ||
| steps: | ||
| - *checkout | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| allow-prereleases: true | ||
| check-latest: true | ||
| - *setup-uv | ||
| - name: Install dependencies | ||
| env: | ||
| HATCH_BUILD_HOOK_ENABLE_MYPYC: ${{ matrix.compiled }} | ||
| run: uv sync --all-extras --frozen | ||
| - name: Run tests | ||
| run: uv run --with tox-uv tox -e py,coverage_report-ci | ||
| - name: Report Coverage | ||
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == ${{ env.DEFAULT_PYTHON }} | ||
|
Check warning on line 102 in .github/workflows/continuous-integration.yml
|
||
| uses: codecov/codecov-action@v7 | ||
| integration: | ||
| name: Integration tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - *checkout | ||
| - *setup-python | ||
| - *setup-uv | ||
| - name: Install dependencies | ||
| env: | ||
| HATCH_BUILD_HOOK_ENABLE_MYPYC: true | ||
| run: uv sync --all-extras --frozen | ||
| - name: Test integration | ||
| run: ./scripts/test_integration.sh | ||