From 809d47e2c2fdf42d0fce3eb582ab728c56b308b1 Mon Sep 17 00:00:00 2001 From: tigdav <47061880+tigdav@users.noreply.github.com> Date: Thu, 4 Jun 2026 21:16:23 +0300 Subject: [PATCH] ci: add Ruff lint check --- .github/workflows/ci.yml | 4 ++++ backend/pyproject.toml | 7 +++++++ backend/requirements-dev.txt | 1 + 3 files changed, 12 insertions(+) create mode 100644 backend/pyproject.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ae6d29..4ca1d84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,10 @@ jobs: python -m pip install --upgrade pip pip install -r requirements-dev.txt + - name: Lint with Ruff + working-directory: backend + run: ruff check . + - name: Run tests working-directory: backend run: pytest apps/gameplay/ diff --git a/backend/pyproject.toml b/backend/pyproject.toml new file mode 100644 index 0000000..71ac3af --- /dev/null +++ b/backend/pyproject.toml @@ -0,0 +1,7 @@ +[tool.ruff] +line-length = 120 +target-version = "py311" +extend-exclude = ["*/migrations/*"] + +[tool.ruff.lint] +select = ["E", "F", "W", "B", "UP", "C4", "SIM"] diff --git a/backend/requirements-dev.txt b/backend/requirements-dev.txt index f37cd50..e4a4226 100644 --- a/backend/requirements-dev.txt +++ b/backend/requirements-dev.txt @@ -1,3 +1,4 @@ -r requirements.txt pytest==8.3.4 pytest-django==4.9.0 +ruff==0.15.16