mirror of
https://github.com/astral-sh/ruff
synced 2026-01-20 21:10:48 -05:00
[red-knot] mypy_primer: split installation and execution (#16622)
## Summary I noticed that the pipeline can succeed if there are problems with tool installation or dependency resolution. This change makes sure that the pipeline fails in these cases.
This commit is contained in:
25
.github/workflows/mypy_primer.yaml
vendored
25
.github/workflows/mypy_primer.yaml
vendored
@@ -43,6 +43,10 @@ jobs:
|
||||
- name: Install Rust toolchain
|
||||
run: rustup show
|
||||
|
||||
- name: Install mypy_primer
|
||||
run: |
|
||||
uv tool install "git+https://github.com/astral-sh/mypy_primer.git@add-red-knot-support"
|
||||
|
||||
- name: Run mypy_primer
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -58,18 +62,15 @@ jobs:
|
||||
|
||||
cd ..
|
||||
|
||||
echo "Running mypy_primer"
|
||||
|
||||
(
|
||||
uvx --verbose --from "git+https://github.com/astral-sh/mypy_primer.git@add-red-knot-support" mypy_primer \
|
||||
--repo ruff \
|
||||
--type-checker knot \
|
||||
--old base_commit \
|
||||
--new "$GITHUB_SHA" \
|
||||
--project-selector '/(mypy_primer|black|pyp|git-revise|zipp|arrow)$' \
|
||||
--output concise \
|
||||
--debug > mypy_primer.diff
|
||||
) || [ $? -eq 1 ]
|
||||
# Allow the exit code to be 0 or 1, only fail for actual mypy_primer crashes/bugs
|
||||
uvx mypy_primer \
|
||||
--repo ruff \
|
||||
--type-checker knot \
|
||||
--old base_commit \
|
||||
--new "$GITHUB_SHA" \
|
||||
--project-selector '/(mypy_primer|black|pyp|git-revise|zipp|arrow)$' \
|
||||
--output concise \
|
||||
--debug > mypy_primer.diff || [ $? -eq 1 ]
|
||||
|
||||
# Output diff with ANSI color codes
|
||||
cat mypy_primer.diff
|
||||
|
||||
Reference in New Issue
Block a user