chore: Move mypy to uv #20390
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: | |
| - master | |
| - release/** | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| BUILD_CACHE_KEY: ${{ github.sha }} | |
| CACHED_BUILD_PATHS: | | |
| ${{ github.workspace }}/dist-serverless | |
| jobs: | |
| lint: | |
| name: Lint Sources | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| python-version: 3.14 | |
| - name: Ruff check | |
| run: uv run ruff check tests sentry_sdk | |
| - name: Ruff format | |
| run: uv run ruff format --check tests sentry_sdk | |
| - name: Linters | |
| run: uv run tox -e linters | |
| - name: Mypy | |
| run: uv run --group typing mypy sentry_sdk | |
| build_lambda_layer: | |
| name: Build Package | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 | |
| with: | |
| python-version: 3.12 | |
| - name: Setup build cache | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| id: build_cache | |
| with: | |
| path: ${{ env.CACHED_BUILD_PATHS }} | |
| key: ${{ env.BUILD_CACHE_KEY }} | |
| - name: Build Packages | |
| run: | | |
| echo "Creating directory containing Python SDK Lambda Layer" | |
| # This will also trigger "make dist" that creates the Python packages | |
| make aws-lambda-layer | |
| - name: Upload Python Packages | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: artifact-build_lambda_layer | |
| path: | | |
| dist/* | |
| if-no-files-found: 'error' | |
| docs: | |
| name: Build SDK API Doc | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 | |
| with: | |
| python-version: 3.12 | |
| - run: | | |
| make apidocs | |
| cd docs/_build && zip -r gh-pages ./ | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: artifact-docs | |
| path: | | |
| docs/_build/gh-pages.zip | |
| if-no-files-found: 'error' |