name: ci on: push: pull_request: jobs: # --------------------------------------------------------------- # core-tests # Runs the full test suite against SQLite. paramiko and the # psycopg pair are installed so the sftp / pg-pool tests run # (rather than skip silently). The live-PG tests still skip # here — they only run in the pg-tests job below where a # Postgres service is up. # --------------------------------------------------------------- core-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install test deps run: | pip install pytest pyyaml fastapi httpx pip install paramiko 'psycopg[binary]' psycopg_pool - name: Run test suite (sqlite path + optional-dep tests) run: pytest tests/ -q # --------------------------------------------------------------- # pg-tests # Same suite, but with a live Postgres service so the round-trip # tests gated on ORGSTATE_TEST_POSTGRES_URL actually run. The # service uses --health-cmd so the steps below only fire once # pg_isready confirms the server is up. # --------------------------------------------------------------- pg-tests: runs-on: ubuntu-latest services: postgres: image: postgres:16-alpine env: POSTGRES_USER: orgstate POSTGRES_PASSWORD: orgstate POSTGRES_DB: orgstate ports: - 5432:5432 options: >- --health-cmd "pg_isready -U orgstate" --health-interval 5s --health-timeout 5s --health-retries 12 env: ORGSTATE_TEST_POSTGRES_URL: postgresql://orgstate:orgstate@localhost:5432/orgstate steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install test deps (incl. psycopg + pool) run: | pip install pytest pyyaml fastapi httpx pip install paramiko 'psycopg[binary]' psycopg_pool - name: Run test suite (sqlite path + live Postgres round-trip) run: pytest tests/ -q # --------------------------------------------------------------- # pilot-smoke # The headline-metric gate: `python -m delivery.pilot` produces # the customer report + decision queue + evidence HTML AND grades # the run against ground truth. If mean lead-time ever turns # negative on the canonical seed, the demo is making a claim the # engine no longer earns — and this job fails. # --------------------------------------------------------------- pilot-smoke: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" # delivery.pilot is stdlib-only. We don't install anything. - name: Run end-to-end pilot run: python -m delivery.pilot --seed 7 --out ./pilot_smoke - name: Upload generated artifacts if: always() uses: actions/upload-artifact@v4 with: name: pilot-smoke-html path: ./pilot_smoke/**/*.html if-no-files-found: warn