mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Use a single lint task in CI (#7540)
This commit is contained in:
parent
8d26e11380
commit
4fdf5fc73f
1 changed files with 10 additions and 19 deletions
29
.github/workflows/ci.yml
vendored
29
.github/workflows/ci.yml
vendored
|
@ -44,9 +44,9 @@ jobs:
|
|||
- "docs/reference/cli.md"
|
||||
- "docs/reference/settings.md"
|
||||
- "uv.schema.json"
|
||||
cargo-fmt:
|
||||
lint:
|
||||
timeout-minutes: 10
|
||||
name: "cargo fmt"
|
||||
name: "lint"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -58,6 +58,9 @@ jobs:
|
|||
- name: "Install Rustfmt"
|
||||
run: rustup component add rustfmt
|
||||
|
||||
- name: "Install uv"
|
||||
uses: astral-sh/setup-uv@v3
|
||||
|
||||
- name: "rustfmt"
|
||||
run: cargo fmt --all --check
|
||||
|
||||
|
@ -69,27 +72,13 @@ jobs:
|
|||
- name: "README check"
|
||||
run: python scripts/transform_readme.py --target pypi
|
||||
|
||||
python-lint:
|
||||
timeout-minutes: 10
|
||||
name: "Python lint"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: "Install uv"
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
||||
- name: "Format"
|
||||
- name: "Python format"
|
||||
run: uvx ruff format --diff .
|
||||
|
||||
- name: "Lint"
|
||||
- name: "Python lint"
|
||||
run: uvx ruff check .
|
||||
|
||||
- name: "Type check"
|
||||
- name: "Python type check"
|
||||
run: uvx mypy
|
||||
|
||||
cargo-clippy:
|
||||
|
@ -186,6 +175,7 @@ jobs:
|
|||
|
||||
- name: "Install required Python versions"
|
||||
run: |
|
||||
# astral-sh/setup-uv sets `UV_CACHE_DIR` which disrupts the help message check
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
uv python install
|
||||
|
||||
|
@ -226,6 +216,7 @@ jobs:
|
|||
|
||||
- name: "Install required Python versions"
|
||||
run: |
|
||||
# astral-sh/setup-uv sets `UV_CACHE_DIR` which disrupts the help message check
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
uv python install
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue