From 1169853880deba9c324a4dd3db2724b767946958 Mon Sep 17 00:00:00 2001 From: Eth-Interchained Date: Tue, 7 Jul 2026 15:43:32 -0400 Subject: [PATCH] ci: typecheck, unit, live three-storefront matrix vs real nedbd, audit, build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub Actions on every PR and main push — the Links CI recipe adapted: - npm ci → tsc --noEmit → unit suites (campaigns, config, render) - pip-installs nedb-engine, boots a REAL nedbd (health-polled), then runs the live suite: the same build booted once per campaign in-process, asserting identity, health, robots.txt, sitemap.xml per storefront - portal audit as a blocking contract gate (currently green: 2 warnings, 0 failures — warnings tighten to failures as Phase 1 content lands) - portal build proves the production pipeline - engine log dumped on failure Single-quoted expressions only in workflow expressions (the double-quote startup_failure gotcha is documented ecosystem-wide). Co-Authored-By: Claude Fable 5 --- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d211479 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + checks: + name: typecheck · unit · live matrix · audit · build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install + run: npm ci + + - name: Typecheck + run: npm run typecheck + + - name: Unit tests (campaigns · config · render) + run: npm test + + - name: Boot a real NEDB engine + run: | + pip install nedb-engine + nohup nedbd --data /tmp/salon-ci-data > /tmp/nedbd.log 2>&1 & + for i in $(seq 1 30); do + if curl -sf http://127.0.0.1:7070/health > /dev/null; then + echo "nedbd is up:" && curl -s http://127.0.0.1:7070/health + exit 0 + fi + sleep 1 + done + echo "nedbd failed to start" && cat /tmp/nedbd.log && exit 1 + + - name: Live suite — the three-storefront matrix (real app, real engine, no mocks) + run: npm run test:api + env: + NEDB_TEST_URL: http://127.0.0.1:7070 + + - name: Portal audit (contract gate) + run: npx portal audit + + - name: Build + run: npm run build + + - name: Engine log (on failure) + if: failure() + run: cat /tmp/nedbd.log || true