65c17ab7e8
actions/setup-python fails in act_runner because it tries to download pre-built binaries from GitHub CDN which aren't available in this environment. Using a Python container image directly is the correct approach — same pattern as the Flutter jobs in fabled_app. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
73 lines
1.5 KiB
YAML
73 lines
1.5 KiB
YAML
# Runs on every push and pull request.
|
|
# Fast checks only — no Docker build. Second runs take ~30s due to caching.
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "src/**"
|
|
- "frontend/**"
|
|
- "tests/**"
|
|
- "pyproject.toml"
|
|
- ".forgejo/workflows/ci.yml"
|
|
pull_request:
|
|
paths:
|
|
- "src/**"
|
|
- "frontend/**"
|
|
- "tests/**"
|
|
- "pyproject.toml"
|
|
- ".forgejo/workflows/ci.yml"
|
|
|
|
jobs:
|
|
typecheck:
|
|
name: TypeScript typecheck
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: frontend
|
|
|
|
- name: Type check
|
|
run: npx vue-tsc --noEmit
|
|
working-directory: frontend
|
|
|
|
lint:
|
|
name: Python lint
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: python:3.12-slim
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install ruff
|
|
run: pip install ruff
|
|
|
|
- name: Lint
|
|
run: ruff check src/
|
|
|
|
test:
|
|
name: Python tests
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: python:3.12-slim
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# git is required by setuptools-scm during package build
|
|
- name: Install git
|
|
run: apt-get update -qq && apt-get install -y -qq git
|
|
|
|
- name: Install package with dev deps
|
|
run: pip install -e ".[dev]"
|
|
|
|
- name: Run tests
|
|
run: pytest tests/ -v
|