External CI/CD Pipeline — branch-independent test runner
Go to file
Claude BM 76dfd3b3c0 Add tag-targeted test runs to CI runner
ci-runner.sh now accepts optional 4th parameter for pytest markers:
  ci-runner.sh mfg abc123 claude genlab  → runs only genlab tests
  ci-runner.sh mfg abc123 claude heavy   → runs full heavy suite
  ci-runner.sh mfg abc123 claude         → runs full light suite (default)

Changes:
- TAG parameter parsed from $4
- pytest -m flag applied when tag provided
- RUN_MODE shown in Telegram notification (light/heavy/tag:name)
- Baseline check only enforced on full light suite runs
- Comments noting tags need periodic updates as features change

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-28 14:44:22 +00:00
ci-config.json Update test baseline: 1279 → 1431 2026-04-26 21:05:50 +00:00
ci-notify.sh Add suite tag and deselected count to CI notifications 2026-04-22 08:14:27 +00:00
ci-runner.sh Add tag-targeted test runs to CI runner 2026-04-28 14:44:22 +00:00
ci-webhook.py Bind webhook server to 0.0.0.0 instead of 127.0.0.1 2026-04-21 16:47:25 +00:00
README.md Rename TestMain → TestDevelop in README 2026-04-28 14:21:15 +00:00

TSHARPS-CI — External CI/CD Pipeline

Branch-independent CI runner for the TSHARPS flight training scheduler.

Branch Model

TestDevelop ──► TestStaging ──► TestProduction
  (dev)       (validate)      (live CI)
  • TestDevelop: Develop CI changes here
  • TestStaging: Validate before going live
  • TestProduction: Runs against ALL TSHARPS branches on every push

How It Works

  1. Developer pushes to any TSHARPS branch (mfg, rogue, spif, staging, main)
  2. Gitea webhook fires POST to http://127.0.0.1:9500/ci
  3. ci-webhook.py receives the event and spawns ci-runner.sh
  4. ci-runner.sh runs against the pushed branch's worktree:
    • Feature manifest verification
    • Test suite (with quarantine for known failures)
    • Package import check
  5. ci-notify.sh sends results to Telegram CICD Pipeline topic

Files

File Purpose
ci-webhook.py HTTP server listening for Gitea push webhooks
ci-runner.sh Main CI script — tests, features, packages
ci-notify.sh Telegram notification sender
ci-config.json Configuration (tokens, paths, timeouts)

Key Rules

  • Read-only: CI runner never writes to TSHARPS repos
  • Same tests for all branches: No branch-specific CI logic
  • No results stored here: Test results handled separately
  • Runner self-monitoring: Crashes send distinct alerts

Promoting CI Changes

# 1. Develop on TestDevelop
git checkout TestDevelop
# make changes
git commit -am "add new check"
git push origin TestDevelop

# 2. Promote to TestStaging
git checkout TestStaging && git merge TestDevelop && git push

# 3. Promote to live
git checkout TestProduction && git merge TestStaging && git push

# 4. Update server
ssh server "cd /srv/tsharps-ci && git pull origin TestProduction"

Switch-Back to Gitea Actions

If this doesn't work out:

  1. Re-enable Gitea Actions: TSHARPS repo → Settings → Actions → check "Active"
  2. Stop runner: sudo systemctl stop tsharps-ci
  3. Remove webhook: TSHARPS repo → Settings → Webhooks → Delete