Use a single lint task in CI (#7540)

This commit is contained in:
konsti 2024-09-19 13:32:08 +02:00 committed by GitHub
parent 8d26e11380
commit 4fdf5fc73f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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