diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 4843361a..f13b799e 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -1,22 +1,23 @@ name: lint & format -on: - pull_request: - types: [opened, reopened, synchronize] +on: + pull_request: + types: [opened, reopened, synchronize] jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - name: Install ruff - run: | - python -m pip install --upgrade pip - pip install ruff - - name: Run lint - run: ruff check --output-format=github contentctl/ - - name: Run Formatter - run: ruff format --check contentctl/ \ No newline at end of file + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install Poetry + run: python -m pip install poetry + - name: Install ruff + run: | + poetry install --only=dev + - name: Run lint + run: poetry run ruff check --output-format=github contentctl/ + - name: Run Formatter + run: poetry run ruff format --check contentctl/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7bd9a339..8c7a2655 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,8 +8,8 @@ repos: - id: detect-private-key - id: forbid-submodules - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.5 + rev: v0.12.10 hooks: - - id: ruff - args: [ --fix ] + - id: ruff-check + args: [--fix] - id: ruff-format diff --git a/pyproject.toml b/pyproject.toml index e6071f5f..2d60a987 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ setuptools = ">=80.9.0" rich = "^14.0.0" [tool.poetry.group.dev.dependencies] -ruff = "^0.12.5" +ruff = "^0.12.10" [build-system] requires = ["poetry-core>=1.0.0"]