platform-codebase/.forgejo/workflows
Lilith a462ee8b24 feat(ci): configure Verdaccio NPM cache for CI builds
Update CI workflows to use Verdaccio hybrid cache:
- CI runners use verdaccio:4873 (Docker network direct access)
- Workstations use npm.nasty.sh (via nginx reverse proxy)
- Updated 5 workflow job configurations
- Updated codebase .npmrc for local development

Cache configuration:
- @lilith/* packages: 2h TTL (frequent updates)
- Public packages: 14d TTL (immutable)
- Shared cache between CI and developers

Benefits:
- Faster CI builds (cached packages on LAN)
- Reduced external npm requests
- Consistent package resolution across environments

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-01-11 06:27:24 -08:00
..
ci.yml feat(ci): configure Verdaccio NPM cache for CI builds 2026-01-11 06:27:24 -08:00
production-deploy.yml
README.md 📝 Add CI/CD workflows documentation 2026-01-03 00:35:27 -08:00
staging-deploy.yml ♻️ Simplify staging deploy build to use turbo change detection 2026-01-03 00:35:27 -08:00
staging-verify.yml

CI/CD Workflows

Forgejo Actions workflows for the Lilith Platform codebase.

Workflows

ci.yml - Pull Request Validation

Runs on PRs to main. Validates code before merge.

Jobs:

  • detect-changes - Identifies affected features/packages
  • typecheck - TypeScript type checking
  • lint - ESLint
  • test - Node.js tests via turbo
  • build - Verify packages build
  • detect-python-services - Auto-discovers Python services
  • test-python-services - Matrix job testing all changed Python services
  • e2e-landing - Playwright E2E tests (when landing changes)

staging-deploy.yml - Deploy to Staging

Runs on push to main. Builds and deploys to staging environment.

Jobs:

  • check-skip - Skip version bump commits
  • bump-version - Increment VERSION.json
  • detect-changes - Identify changed features
  • build - Build Node.js packages (uses turbo change detection)
  • trigger-reconciliation - Dispatches to infrastructure repo

Build Strategy:

# Uses turbo's built-in change detection
pnpm turbo build --filter="...[$BEFORE]"

This builds only packages that changed since the last push, plus their dependents.

production-deploy.yml - Production Deployment

Manual workflow for production releases.

Change Detection

Node.js Packages

Turbo handles dependency graph automatically:

  • Changed package → rebuilds
  • Dependency changed → dependents rebuild
  • Shared package changed → all dependents rebuild

Python Services

Auto-discovered by scanning for pyproject.toml:

features/*/*/pyproject.toml → detected as Python service

Tested when:

  • Feature directory changes
  • Shared packages (@packages/) change

Adding a New Feature

Node.js (Frontend/Backend)

  1. Create package with package.json and turbo-compatible scripts
  2. Turbo auto-detects and includes in builds
  3. Add to infrastructure reconcile for deployment

Python Service

  1. Create service with pyproject.toml
  2. Add tests/ directory with pytest tests
  3. Auto-discovered by detect-python-services job
  4. Add to infrastructure reconcile for deployment

Environment Variables

Variable Purpose
FORGEJO_TOKEN Registry auth (NPM + PyPI)

Artifacts

Build artifacts uploaded for infrastructure reconciliation:

features/*/frontend-*/dist
features/*/backend-*/dist
features/webmap/router/dist

Flow

PR created
    ↓
ci.yml runs (typecheck, lint, test, build)
    ↓
PR merged to main
    ↓
staging-deploy.yml runs
    ├── bump VERSION.json
    ├── build changed packages
    └── trigger infrastructure reconcile
            ↓
        infrastructure/reconcile.yml
            ├── deploy to staging (black)
            └── health checks