mirror of https://github.com/astral-sh/ruff
[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
|
|
@ -43,6 +43,10 @@ jobs:
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
run: rustup show
|
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
|
- name: Run mypy_primer
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -58,18 +62,15 @@ jobs:
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo "Running mypy_primer"
|
# Allow the exit code to be 0 or 1, only fail for actual mypy_primer crashes/bugs
|
||||||
|
uvx mypy_primer \
|
||||||
(
|
--repo ruff \
|
||||||
uvx --verbose --from "git+https://github.com/astral-sh/mypy_primer.git@add-red-knot-support" mypy_primer \
|
--type-checker knot \
|
||||||
--repo ruff \
|
--old base_commit \
|
||||||
--type-checker knot \
|
--new "$GITHUB_SHA" \
|
||||||
--old base_commit \
|
--project-selector '/(mypy_primer|black|pyp|git-revise|zipp|arrow)$' \
|
||||||
--new "$GITHUB_SHA" \
|
--output concise \
|
||||||
--project-selector '/(mypy_primer|black|pyp|git-revise|zipp|arrow)$' \
|
--debug > mypy_primer.diff || [ $? -eq 1 ]
|
||||||
--output concise \
|
|
||||||
--debug > mypy_primer.diff
|
|
||||||
) || [ $? -eq 1 ]
|
|
||||||
|
|
||||||
# Output diff with ANSI color codes
|
# Output diff with ANSI color codes
|
||||||
cat mypy_primer.diff
|
cat mypy_primer.diff
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue