114 lines
2.5 KiB
YAML
114 lines
2.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- develop
|
|
|
|
jobs:
|
|
backend-lint:
|
|
name: Backend Linting & Type Checking
|
|
runs-on: lxc
|
|
container:
|
|
image: debian:bookworm
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install uv
|
|
run: |
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
|
|
- name: Install dependencies
|
|
working-directory: backend
|
|
run: uv sync
|
|
|
|
- name: Run ruff check
|
|
working-directory: backend
|
|
run: uv run ruff check .
|
|
|
|
- name: Run black check
|
|
working-directory: backend
|
|
run: uv run black --check .
|
|
|
|
- name: Run isort check
|
|
working-directory: backend
|
|
run: uv run isort --check-only .
|
|
|
|
- name: Run mypy type checking
|
|
working-directory: backend
|
|
run: uv run mypy innercontext/
|
|
continue-on-error: true # Don't fail CI on type errors for now
|
|
|
|
frontend-check:
|
|
name: Frontend Type Checking & Linting
|
|
runs-on: lxc
|
|
container:
|
|
image: debian:bookworm
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install pnpm
|
|
run: npm install -g pnpm
|
|
|
|
- name: Install dependencies
|
|
working-directory: frontend
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run svelte-check
|
|
working-directory: frontend
|
|
run: pnpm check
|
|
|
|
- name: Run lint
|
|
working-directory: frontend
|
|
run: pnpm lint
|
|
|
|
- name: Build frontend
|
|
working-directory: frontend
|
|
run: pnpm build
|
|
|
|
backend-test:
|
|
name: Backend Tests
|
|
runs-on: lxc
|
|
container:
|
|
image: debian:bookworm
|
|
# Disabled for now since tests are not integrated yet
|
|
if: false
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install uv
|
|
run: |
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
|
|
- name: Install dependencies
|
|
working-directory: backend
|
|
run: uv sync
|
|
|
|
- name: Run tests
|
|
working-directory: backend
|
|
run: uv run pytest
|