Files
FabledCurator/.forgejo/workflows/ci.yml
T
bvandeusen 80a5690740 fix(fc2a): apply ruff autofix + skip vue-tsc check (no tsconfig)
Ruff:
The remaining I001 errors came from ruff treating `alembic` as a first-
party module (because the alembic/ directory exists in the repo root)
rather than third-party. Ran `ruff check --fix` locally — auto-sorted
import groupings to put alembic/sqlalchemy alongside backend.* as first-
party, and trimmed redundant blank lines after a few import blocks.

Frontend:
`npm run check` (vue-tsc --noEmit) was failing because vue-tsc has no
tsconfig.json to read against, and the frontend is pure JS without
JSDoc annotations — vue-tsc had nothing to do. Skipping the step until
we add a tsconfig + convert to TS or add JSDoc annotations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 14:24:25 -04:00

78 lines
2.5 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
# No package-lock.json is tracked yet (we don't run npm locally per
# feedback-no-local-runs). Using `npm install` instead of `npm ci`.
# If we want strict lockfile-based reproducibility later, commit a
# package-lock.json and flip this back to `npm ci`.
- run: npm install --no-audit --no-fund
# `npm run check` (vue-tsc --noEmit) skipped: the frontend is pure JS
# with no .ts files and no JSDoc annotations, so vue-tsc has nothing
# to type-check. Re-enable once we add a tsconfig.json and either
# convert to TS or add JSDoc.
- run: npm run build