From 99b74d8d5b676db6323265e47d2dff40c4dcc975 Mon Sep 17 00:00:00 2001 From: seeleng Date: Thu, 19 Sep 2024 15:09:27 +0800 Subject: [PATCH] feat: add backend linter --- .github/workflows/lint.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 406fe166..5b61f14d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,7 +1,8 @@ name: CI on: push jobs: - eslint: + frontend: + name: frontend (eslint) runs-on: ubuntu-latest defaults: run: @@ -15,3 +16,22 @@ jobs: run: npm install - name: ESLint run: npm run lint + backend: + name: format, lint and type-check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: true + cache-dependency-glob: "uv.lock" + version: "0.4.10" + - name: Set up Python + run: uv python install + - name: Install dependencies + run: uv sync --all-extras --dev + - name: Check code formatting + run: uvx ruff format --check + - name: Lint + run: uvx ruff check