This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [astral-sh/setup-uv](https://redirect.github.com/astral-sh/setup-uv) | action | minor | `v7.1.6` → `v7.2.0` | --- ### Release Notes <details> <summary>astral-sh/setup-uv (astral-sh/setup-uv)</summary> ### [`v7.2.0`](https://redirect.github.com/astral-sh/setup-uv/releases/tag/v7.2.0): 🌈 add outputs python-version and python-cache-hit [Compare Source](https://redirect.github.com/astral-sh/setup-uv/compare/v7.1.6...v7.2.0) ##### Changes Among some minor typo fixes and quality of life features for developers of actions the main feature of this release are new outputs: - **python-version:** The Python version that was set (same content as existing `UV_PYTHON`) - **python-cache-hit:** A boolean value to indicate the Python cache entry was found While implementing this it became clear, that it is easier to handle the Python binaries in a separate cache entry. The added benefit for users is that the "normal" cache containing the dependencies can be used in all runs no matter if these cache the Python binaries or not. > \[!NOTE]\ > This release will invalidate caches that contain the Python binaries. This happens a single time. ##### 🐛 Bug fixes - chore: remove stray space from UV\_PYTHON\_INSTALL\_DIR message [@​akx](https://redirect.github.com/akx) ([#​720](https://redirect.github.com/astral-sh/setup-uv/issues/720)) ##### 🚀 Enhancements - add outputs python-version and python-cache-hit [@​eifinger](https://redirect.github.com/eifinger) ([#​728](https://redirect.github.com/astral-sh/setup-uv/issues/728)) - Add action typings with validation [@​krzema12](https://redirect.github.com/krzema12) ([#​721](https://redirect.github.com/astral-sh/setup-uv/issues/721)) ##### 🧰 Maintenance - fix: use uv\_build backend for old-python-constraint-project [@​eifinger](https://redirect.github.com/eifinger) ([#​729](https://redirect.github.com/astral-sh/setup-uv/issues/729)) - chore: update known checksums for 0.9.22 @​[github-actions\[bot\]](https://redirect.github.com/apps/github-actions) ([#​727](https://redirect.github.com/astral-sh/setup-uv/issues/727)) - chore: update known checksums for 0.9.21 @​[github-actions\[bot\]](https://redirect.github.com/apps/github-actions) ([#​726](https://redirect.github.com/astral-sh/setup-uv/issues/726)) - chore: update known checksums for 0.9.20 @​[github-actions\[bot\]](https://redirect.github.com/apps/github-actions) ([#​725](https://redirect.github.com/astral-sh/setup-uv/issues/725)) - chore: update known checksums for 0.9.18 @​[github-actions\[bot\]](https://redirect.github.com/apps/github-actions) ([#​718](https://redirect.github.com/astral-sh/setup-uv/issues/718)) ##### ⬆️ Dependency updates - Bump peter-evans/create-pull-request from 7.0.9 to 8.0.0 @​[dependabot\[bot\]](https://redirect.github.com/apps/dependabot) ([#​719](https://redirect.github.com/astral-sh/setup-uv/issues/719)) - Bump github/codeql-action from 4.31.6 to 4.31.9 @​[dependabot\[bot\]](https://redirect.github.com/apps/dependabot) ([#​723](https://redirect.github.com/astral-sh/setup-uv/issues/723)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/ruff). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43NC41IiwidXBkYXRlZEluVmVyIjoiNDIuNzQuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
166 lines
5.3 KiB
YAML
166 lines
5.3 KiB
YAML
name: Run mypy_primer
|
|
|
|
permissions: {}
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "crates/ty*/**"
|
|
- "!crates/ty_ide/**"
|
|
- "!crates/ty_server/**"
|
|
- "!crates/ty_test/**"
|
|
- "!crates/ty_completion_eval/**"
|
|
- "!crates/ty_wasm/**"
|
|
- "crates/ruff_db"
|
|
- "crates/ruff_python_ast"
|
|
- "crates/ruff_python_parser"
|
|
- ".github/workflows/mypy_primer.yaml"
|
|
- ".github/workflows/mypy_primer_comment.yaml"
|
|
- "scripts/mypy_primer.sh"
|
|
- "Cargo.lock"
|
|
- "!**.md"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
CARGO_NET_RETRY: 10
|
|
CARGO_TERM_COLOR: always
|
|
RUSTUP_MAX_RETRIES: 10
|
|
RUST_BACKTRACE: 1
|
|
|
|
jobs:
|
|
mypy_primer:
|
|
name: Run mypy_primer
|
|
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'depot-ubuntu-22.04-32' || 'ubuntu-latest' }}
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
with:
|
|
path: ruff
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Install the latest version of uv
|
|
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
|
|
|
|
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
|
|
with:
|
|
shared-key: "mypy-primer"
|
|
workspaces: "ruff"
|
|
|
|
- name: Install Rust toolchain
|
|
run: rustup show
|
|
|
|
- name: Run mypy_primer
|
|
env:
|
|
PRIMER_SELECTOR: crates/ty_python_semantic/resources/primer/good.txt
|
|
CLICOLOR_FORCE: "1"
|
|
DIFF_FILE: mypy_primer.diff
|
|
run: |
|
|
cd ruff
|
|
scripts/mypy_primer.sh
|
|
|
|
# NOTE: astral-sh-bot uses this artifact to post comments on PRs.
|
|
# Make sure to update the bot if you rename the artifact.
|
|
- name: Upload diff
|
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
with:
|
|
name: mypy_primer_diff
|
|
path: mypy_primer.diff
|
|
|
|
memory_usage:
|
|
name: Run memory statistics
|
|
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'depot-ubuntu-22.04-32' || 'ubuntu-latest' }}
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
with:
|
|
path: ruff
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Install the latest version of uv
|
|
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
|
|
|
|
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
|
|
with:
|
|
workspaces: "ruff"
|
|
shared-key: "mypy-primer"
|
|
|
|
- name: Install Rust toolchain
|
|
run: rustup show
|
|
|
|
- name: Run mypy_primer
|
|
env:
|
|
TY_MAX_PARALLELISM: 1 # for deterministic memory numbers
|
|
TY_MEMORY_REPORT: mypy_primer
|
|
PRIMER_SELECTOR: crates/ty_python_semantic/resources/primer/memory.txt
|
|
DIFF_FILE: mypy_primer_memory.diff
|
|
run: |
|
|
cd ruff
|
|
scripts/mypy_primer.sh
|
|
|
|
- name: Upload diff
|
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
with:
|
|
name: mypy_primer_memory_diff
|
|
path: mypy_primer_memory.diff
|
|
|
|
# Runs mypy twice against the same ty version to catch any non-deterministic behavior (ideally).
|
|
# The job is disabled for now because there are some non-deterministic diagnostics.
|
|
mypy_primer_same_revision:
|
|
name: Run mypy_primer on same revision
|
|
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'depot-ubuntu-22.04-32' || 'ubuntu-latest' }}
|
|
timeout-minutes: 20
|
|
# TODO: Enable once we fixed the non-deterministic diagnostics
|
|
if: false
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
with:
|
|
path: ruff
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Install the latest version of uv
|
|
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
|
|
|
|
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
|
|
with:
|
|
workspaces: "ruff"
|
|
shared-key: "mypy-primer"
|
|
|
|
- name: Install Rust toolchain
|
|
run: rustup show
|
|
|
|
- name: Run determinism check
|
|
env:
|
|
BASE_REVISION: ${{ github.event.pull_request.head.sha }}
|
|
PRIMER_SELECTOR: crates/ty_python_semantic/resources/primer/good.txt
|
|
CLICOLOR_FORCE: "1"
|
|
DIFF_FILE: mypy_primer_determinism.diff
|
|
run: |
|
|
cd ruff
|
|
scripts/mypy_primer.sh
|
|
|
|
- name: Check for non-determinism
|
|
run: |
|
|
# Remove ANSI color codes for checking
|
|
sed -e 's/\x1b\[[0-9;]*m//g' mypy_primer_determinism.diff > mypy_primer_determinism_clean.diff
|
|
|
|
# Check if there are any differences (non-determinism)
|
|
if [ -s mypy_primer_determinism_clean.diff ]; then
|
|
echo "ERROR: Non-deterministic output detected!"
|
|
echo "The following differences were found when running ty twice on the same commit:"
|
|
cat mypy_primer_determinism_clean.diff
|
|
exit 1
|
|
else
|
|
echo "✓ Output is deterministic"
|
|
fi
|