15b47777ae
Per FabledRulebook forgejo.md, toolchain versions live on the runner image, not in the workflow. Two changes here, paired with the runner image bump (RUFF_VERSION 0.9.7 -> 0.15.13 in CI-Runner/CI-python): - Drop "ruff>=0.9,<1.0" from ci.yml's pip install — the runner image's pre-installed ruff is authoritative now. Previously this constraint matched the existing 0.9.7 in the image so pip never upgraded. - Flip ruff.toml's target-version back to py314 now that the runner has a ruff new enough to know about it. Next bump path: edit RUFF_VERSION in CI-Runner/CI-python/Dockerfile, 'make push', done. No workflow churn. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
71 lines
2.0 KiB
YAML
71 lines
2.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [dev, main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
backend-lint-and-test:
|
|
# Runner must have Python 3.14 + ruff + Node 22 pre-installed. The
|
|
# python-ci runner image lives at CI-Runner/CI-python/ in the operator's
|
|
# workspace; see that Dockerfile + Makefile to roll/push the image.
|
|
runs-on: python-ci
|
|
services:
|
|
postgres:
|
|
image: pgvector/pgvector:pg16
|
|
env:
|
|
POSTGRES_USER: fabledcurator
|
|
POSTGRES_PASSWORD: ci_test_password
|
|
POSTGRES_DB: fabledcurator_test
|
|
options: >-
|
|
--health-cmd "pg_isready -U fabledcurator"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
redis:
|
|
image: redis:7-alpine
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
env:
|
|
DB_USER: fabledcurator
|
|
DB_PASSWORD: ci_test_password
|
|
DB_HOST: postgres
|
|
DB_PORT: "5432"
|
|
DB_NAME: fabledcurator_test
|
|
CELERY_BROKER_URL: redis://redis:6379/0
|
|
CELERY_RESULT_BACKEND: redis://redis:6379/0
|
|
SECRET_KEY: ci_test_secret_not_for_prod
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Python deps
|
|
# ruff is pre-installed in the python-ci runner image (see
|
|
# CI-Runner/CI-python/Dockerfile's RUFF_VERSION). Per FabledRulebook
|
|
# forgejo.md, toolchain versions live on the runner image, not here.
|
|
run: pip install -r requirements.txt pytest pytest-asyncio
|
|
|
|
- name: Ruff lint
|
|
run: ruff check backend/ tests/ alembic/
|
|
|
|
- name: Alembic upgrade (smoke)
|
|
run: alembic upgrade head
|
|
|
|
- name: Pytest (unit only)
|
|
run: pytest tests/ -v
|
|
|
|
frontend-build:
|
|
runs-on: python-ci
|
|
defaults:
|
|
run:
|
|
working-directory: frontend
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: npm ci --no-audit --no-fund
|
|
- run: npm run check
|
|
- run: npm run build
|