mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 14:51:25 +00: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:
parent
0af4985067
commit
3b497716f1
1 changed files with 13 additions and 12 deletions
13
.github/workflows/mypy_primer.yaml
vendored
13
.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 \
|
||||
# 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 ]
|
||||
--debug > mypy_primer.diff || [ $? -eq 1 ]
|
||||
|
||||
# Output diff with ANSI color codes
|
||||
cat mypy_primer.diff
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue