Migrate CI and Build Infrastructure to UV #389
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: Type Checks | |
| on: # Trigger the workflow on push or pull request, but only for the main branch | |
| push: | |
| branches: [main, "release/*"] | |
| paths: | |
| - "setup.*" | |
| - "requirements.txt" | |
| - "pyproject.toml" | |
| - "src/**" | |
| - "requirements/**" | |
| - ".github/workflows/code-checks.yml" | |
| # Exclude documentation-only files from triggering | |
| - "!docs/**" | |
| - "!**/*.md" | |
| - "!**/*.rst" | |
| - "!**/CHANGELOG.md" | |
| - "!**/CODE_OF_CONDUCT.md" | |
| - "!**/CONTRIBUTING.md" | |
| - "!**/LICENSE*" | |
| pull_request: | |
| branches: [main, "release/*"] | |
| paths: | |
| - "setup.*" | |
| - "requirements.txt" | |
| - "pyproject.toml" | |
| - "src/**" | |
| - "requirements/**" | |
| - ".github/workflows/code-checks.yml" | |
| # Exclude documentation-only files from triggering | |
| - "!docs/**" | |
| - "!**/*.md" | |
| - "!**/*.rst" | |
| - "!**/CHANGELOG.md" | |
| - "!**/CODE_OF_CONDUCT.md" | |
| - "!**/CONTRIBUTING.md" | |
| - "!**/LICENSE*" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} | |
| cancel-in-progress: ${{ ! (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }} | |
| env: | |
| USE_CI_COMMIT_PIN: "1" | |
| jobs: | |
| type-check: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install CI Dependencies | |
| uses: ./.github/actions/install-ci-dependencies | |
| with: | |
| python_version: "3.12" | |
| use_commit_pin: "true" | |
| show_pip_list: "true" | |
| - name: Run pyright type check | |
| shell: bash | |
| run: | | |
| pyright -p pyproject.toml | |
| # Note: UV cache pruning is handled automatically by setup-uv action | |
| # with prune-cache: true (set in install-ci-dependencies action) |