This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Swatinem/rust-cache](https://redirect.github.com/Swatinem/rust-cache) | action | minor | `v2.7.8` -> `v2.8.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>Swatinem/rust-cache (Swatinem/rust-cache)</summary> ### [`v2.8.0`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.8.0) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.7.8...v2.8.0) ##### What's Changed - Add cache-workspace-crates feature by [@​jbransen](https://redirect.github.com/jbransen) in [https://github.com/Swatinem/rust-cache/pull/246](https://redirect.github.com/Swatinem/rust-cache/pull/246) - Feat: support warpbuild cache provider by [@​stegaBOB](https://redirect.github.com/stegaBOB) in [https://github.com/Swatinem/rust-cache/pull/247](https://redirect.github.com/Swatinem/rust-cache/pull/247) ##### New Contributors - [@​jbransen](https://redirect.github.com/jbransen) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/246](https://redirect.github.com/Swatinem/rust-cache/pull/246) - [@​stegaBOB](https://redirect.github.com/stegaBOB) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/247](https://redirect.github.com/Swatinem/rust-cache/pull/247) **Full Changelog**: https://github.com/Swatinem/rust-cache/compare/v2.7.8...v2.8.0 </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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNy4yIiwidXBkYXRlZEluVmVyIjoiNDEuMTcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
104 lines
3.1 KiB
YAML
104 lines
3.1 KiB
YAML
name: Run mypy_primer
|
|
|
|
permissions: {}
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "crates/ty*/**"
|
|
- "crates/ruff_db"
|
|
- "crates/ruff_python_ast"
|
|
- "crates/ruff_python_parser"
|
|
- ".github/workflows/mypy_primer.yaml"
|
|
- ".github/workflows/mypy_primer_comment.yaml"
|
|
- "Cargo.lock"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
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: depot-ubuntu-22.04-32
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
path: ruff
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Install the latest version of uv
|
|
uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1
|
|
|
|
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
|
with:
|
|
workspaces: "ruff"
|
|
|
|
- name: Install Rust toolchain
|
|
run: rustup show
|
|
|
|
- name: Run mypy_primer
|
|
shell: bash
|
|
env:
|
|
TY_MEMORY_REPORT: mypy_primer
|
|
run: |
|
|
cd ruff
|
|
|
|
echo "Enabling mypy primer specific configuration overloads (see .github/mypy-primer-ty.toml)"
|
|
mkdir -p ~/.config/ty
|
|
cp .github/mypy-primer-ty.toml ~/.config/ty/ty.toml
|
|
|
|
PRIMER_SELECTOR="$(paste -s -d'|' crates/ty_python_semantic/resources/primer/good.txt)"
|
|
|
|
echo "new commit"
|
|
git rev-list --format=%s --max-count=1 "$GITHUB_SHA"
|
|
|
|
MERGE_BASE="$(git merge-base "$GITHUB_SHA" "origin/$GITHUB_BASE_REF")"
|
|
git checkout -b base_commit "$MERGE_BASE"
|
|
echo "base commit"
|
|
git rev-list --format=%s --max-count=1 base_commit
|
|
|
|
cd ..
|
|
|
|
echo "Project selector: $PRIMER_SELECTOR"
|
|
# Allow the exit code to be 0 or 1, only fail for actual mypy_primer crashes/bugs
|
|
uvx \
|
|
--from="git+https://github.com/hauntsaninja/mypy_primer@e5f55447969d33ae3c7ccdb183e2a37101867270" \
|
|
mypy_primer \
|
|
--repo ruff \
|
|
--type-checker ty \
|
|
--old base_commit \
|
|
--new "$GITHUB_SHA" \
|
|
--project-selector "/($PRIMER_SELECTOR)\$" \
|
|
--output concise \
|
|
--debug > mypy_primer.diff || [ $? -eq 1 ]
|
|
|
|
# Output diff with ANSI color codes
|
|
cat mypy_primer.diff
|
|
|
|
# Remove ANSI color codes before uploading
|
|
sed -ie 's/\x1b\[[0-9;]*m//g' mypy_primer.diff
|
|
|
|
echo ${{ github.event.number }} > pr-number
|
|
|
|
- name: Upload diff
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: mypy_primer_diff
|
|
path: mypy_primer.diff
|
|
|
|
- name: Upload pr-number
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: pr-number
|
|
path: pr-number
|