chore(deps): update dependency python to 3.14 #166
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: Run mypy_primer | |
| on: | |
| # Only run on PR, since we diff against main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| mypy_primer: | |
| name: Run | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| shard-index: [0] # e.g. change this to [0, 1, 2] and --num-shards below to 3 | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| path: django-stubs_to_test | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install dependencies | |
| run: | | |
| uv venv | |
| uv pip install git+https://github.com/hauntsaninja/mypy_primer.git | |
| - name: Run mypy_primer | |
| shell: bash | |
| run: | | |
| cd django-stubs_to_test | |
| MYPY_VERSION=$(uv tree --package=mypy --depth=0 -q | sed -n 's/^mypy v\(.\+\)$/\1/p') | |
| echo "new commit" | |
| git checkout $GITHUB_SHA | |
| git rev-list --format=%s --max-count=1 HEAD | |
| MERGE_BASE=$(git merge-base $GITHUB_SHA origin/$GITHUB_BASE_REF) | |
| git worktree add ../django-stubs_base $MERGE_BASE | |
| cd ../django-stubs_base | |
| echo "base commit" | |
| git rev-list --format=%s --max-count=1 HEAD | |
| echo '' | |
| cd .. | |
| # fail action if exit code isn't zero or one | |
| ( | |
| uv run mypy_primer \ | |
| --new v${MYPY_VERSION} --old v${MYPY_VERSION} \ | |
| --known-dependency-selector django-stubs \ | |
| --old-prepend-path django-stubs_base --new-prepend-path django-stubs_to_test \ | |
| --num-shards 1 --shard-index ${{ matrix.shard-index }} \ | |
| --debug \ | |
| --output concise \ | |
| | tee diff_${{ matrix.shard-index }}.txt | |
| ) || [ $? -eq 1 ] | |
| - if: ${{ matrix.shard-index == 0 }} | |
| name: Save PR number | |
| run: | | |
| echo ${{ github.event.pull_request.number }} | tee pr_number.txt | |
| - name: Upload mypy_primer diff + PR number | |
| uses: actions/upload-artifact@v5 | |
| if: ${{ matrix.shard-index == 0 }} | |
| with: | |
| name: mypy_primer_diffs-${{ matrix.shard-index }} | |
| path: | | |
| diff_${{ matrix.shard-index }}.txt | |
| pr_number.txt | |
| - name: Upload mypy_primer diff | |
| uses: actions/upload-artifact@v5 | |
| if: ${{ matrix.shard-index != 0 }} | |
| with: | |
| name: mypy_primer_diffs-${{ matrix.shard-index }} | |
| path: diff_${{ matrix.shard-index }}.txt | |
| join_artifacts: | |
| name: Join artifacts | |
| runs-on: ubuntu-latest | |
| needs: [mypy_primer] | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Merge artifacts | |
| uses: actions/upload-artifact/merge@v5 | |
| with: | |
| name: mypy_primer_diffs | |
| pattern: mypy_primer_diffs-* | |
| delete-merged: true |