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