84 lines
2.1 KiB
YAML
84 lines
2.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint-python:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astral-sh/ruff-action@v1
|
|
with:
|
|
args: check .
|
|
|
|
test-python:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python 3.12
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
- name: Run tests
|
|
run: pytest -v --tb=short
|
|
|
|
typecheck-python:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python 3.12
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
- name: Run mypy
|
|
run: mypy app/ --ignore-missing-imports
|
|
|
|
lint-frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
cache-dependency-path: webui/package-lock.json
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: webui
|
|
- name: TypeScript check
|
|
run: npx tsc --noEmit
|
|
working-directory: webui
|
|
- name: Lint
|
|
run: npx eslint src/ || echo "ESLint not configured — skipping"
|
|
working-directory: webui
|
|
|
|
test-frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
cache-dependency-path: webui/package-lock.json
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: webui
|
|
- name: Run Vitest
|
|
run: npx vitest run --reporter=verbose
|
|
working-directory: webui
|