Skip to content

ci: add backend linting workflow #1

ci: add backend linting workflow

ci: add backend linting workflow #1

Workflow file for this run

name: Lint Backend
on:
push:
branches:
- master
paths:
- "backend/**"
pull_request:
branches:
- master
paths:
- "backend/**"
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.9.18"
- name: Cache uv dependencies
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: uv-${{ runner.os }}-${{ hashFiles('backend/uv.lock') }}
restore-keys: uv-${{ runner.os }}-
- name: Install dependencies
run: uv sync
- name: Run ruff check
run: uv run ruff check --output-format=github .
- name: Run ruff format check
run: uv run ruff format --check --diff .