Skip to content

Commit

Permalink
Use a single lint task in CI (#7540)
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin authored Sep 19, 2024
1 parent 8d26e11 commit 4fdf5fc
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4fdf5fc

Please sign in to comment.