Set up pre-commit framework with ruff (backend) and ESLint/Prettier/tsc (frontend) hooks to catch issues locally before CI. Auto-format all frontend files with Prettier to comply with the new check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [develop]
|
|
paths-ignore:
|
|
- ".beans/**"
|
|
- "*.md"
|
|
- "LICENSE"
|
|
- ".gitignore"
|
|
- ".github/workflows/deploy.yml"
|
|
pull_request:
|
|
branches: [develop]
|
|
paths-ignore:
|
|
- ".beans/**"
|
|
- "*.md"
|
|
- "LICENSE"
|
|
- ".gitignore"
|
|
- ".github/workflows/deploy.yml"
|
|
|
|
jobs:
|
|
backend-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- run: pip install ruff
|
|
- name: Check linting
|
|
run: ruff check backend/
|
|
- name: Check formatting
|
|
run: ruff format --check backend/
|
|
|
|
frontend-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "24"
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: frontend
|
|
- name: Lint
|
|
run: npm run lint
|
|
working-directory: frontend
|
|
- name: Check formatting
|
|
run: npx prettier --check "src/**/*.{ts,tsx,css,json}"
|
|
working-directory: frontend
|
|
- name: Type check
|
|
run: npx tsc -b
|
|
working-directory: frontend
|