From fa183e0290137b07bcbb3a43efd74e1483153dd5 Mon Sep 17 00:00:00 2001 From: nams1570 Date: Tue, 30 Jun 2026 18:19:33 -0700 Subject: [PATCH] fix(ci): ci should call bulldozer server --- .../db-migration-backwards-compatibility.yaml | 41 ++++++++++++++++++- .github/workflows/e2e-api-tests.yaml | 17 ++++++++ .../e2e-custom-base-port-api-tests.yaml | 17 ++++++++ .github/workflows/e2e-fallback-tests.yaml | 17 ++++++++ package.json | 1 + 5 files changed, 92 insertions(+), 1 deletion(-) diff --git a/.github/workflows/db-migration-backwards-compatibility.yaml b/.github/workflows/db-migration-backwards-compatibility.yaml index 86eacea33..63e629e57 100644 --- a/.github/workflows/db-migration-backwards-compatibility.yaml +++ b/.github/workflows/db-migration-backwards-compatibility.yaml @@ -158,7 +158,29 @@ jobs: - name: Initialize database run: pnpm run db:init - + + # This job runs base-branch code, so only start/backfill bulldozer-js when the base + # branch actually ships it (skipped on the PR that introduces bulldozer-js). Mirrors + # the run-cron-jobs hashFiles guard below. + - name: Start bulldozer-js in background + if: ${{ hashFiles('apps/bulldozer-js/package.json') != '' }} + uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # v1.0.7 + env: + HEXCLAVE_BULLDOZER_JS_USE_TMP_LMDB: "1" + with: + run: pnpm run start:bulldozer & + wait-on: | + tcp:localhost:8146 + tail: true + wait-for: 30s + log-output-if: true + + # db:init only seeds Postgres now; mirror the seeded payment rows into the + # fresh bulldozer-js store so the backend's payment reads aren't empty. + - name: Backfill Bulldozer from Postgres + if: ${{ hashFiles('apps/bulldozer-js/package.json') != '' }} + run: pnpm run db:backfill-bulldozer-from-prisma + - name: Start stack-backend in background uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # v1.0.7 with: @@ -366,6 +388,23 @@ jobs: - name: Initialize database run: pnpm run db:init + - name: Start bulldozer-js in background + uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # v1.0.7 + env: + HEXCLAVE_BULLDOZER_JS_USE_TMP_LMDB: "1" + with: + run: pnpm run start:bulldozer & + wait-on: | + tcp:localhost:8146 + tail: true + wait-for: 30s + log-output-if: true + + # db:init only seeds Postgres now; mirror the seeded payment rows into the + # fresh bulldozer-js store so the backend's payment reads aren't empty. + - name: Backfill Bulldozer from Postgres + run: pnpm run db:backfill-bulldozer-from-prisma + - name: Start stack-backend in background uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # v1.0.7 with: diff --git a/.github/workflows/e2e-api-tests.yaml b/.github/workflows/e2e-api-tests.yaml index ca1136009..5524855d1 100644 --- a/.github/workflows/e2e-api-tests.yaml +++ b/.github/workflows/e2e-api-tests.yaml @@ -115,6 +115,23 @@ jobs: - name: Initialize database run: pnpm run db:init + - name: Start bulldozer-js in background + uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # v1.0.7 + env: + HEXCLAVE_BULLDOZER_JS_USE_TMP_LMDB: "1" + with: + run: pnpm run start:bulldozer & + wait-on: | + tcp:localhost:8146 + tail: true + wait-for: 30s + log-output-if: true + + # db:init only seeds Postgres now; mirror the seeded payment rows into the + # fresh bulldozer-js store so the backend's payment reads aren't empty. + - name: Backfill Bulldozer from Postgres + run: pnpm run db:backfill-bulldozer-from-prisma + - name: Start stack-backend in background uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # v1.0.7 with: diff --git a/.github/workflows/e2e-custom-base-port-api-tests.yaml b/.github/workflows/e2e-custom-base-port-api-tests.yaml index 1a8c99cb6..34836b66b 100644 --- a/.github/workflows/e2e-custom-base-port-api-tests.yaml +++ b/.github/workflows/e2e-custom-base-port-api-tests.yaml @@ -109,6 +109,23 @@ jobs: - name: Initialize database run: pnpm run db:init + - name: Start bulldozer-js in background + uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # v1.0.7 + env: + HEXCLAVE_BULLDOZER_JS_USE_TMP_LMDB: "1" + with: + run: pnpm run start:bulldozer & + wait-on: | + tcp:localhost:6746 + tail: true + wait-for: 30s + log-output-if: true + + # db:init only seeds Postgres now; mirror the seeded payment rows into the + # fresh bulldozer-js store so the backend's payment reads aren't empty. + - name: Backfill Bulldozer from Postgres + run: pnpm run db:backfill-bulldozer-from-prisma + - name: Start stack-backend in background uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # v1.0.7 with: diff --git a/.github/workflows/e2e-fallback-tests.yaml b/.github/workflows/e2e-fallback-tests.yaml index d4eebfe90..2e1aefdea 100644 --- a/.github/workflows/e2e-fallback-tests.yaml +++ b/.github/workflows/e2e-fallback-tests.yaml @@ -91,6 +91,23 @@ jobs: - name: Initialize database run: pnpm run db:init + - name: Start bulldozer-js in background + uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # v1.0.7 + env: + HEXCLAVE_BULLDOZER_JS_USE_TMP_LMDB: "1" + with: + run: pnpm run start:bulldozer & + wait-on: | + tcp:localhost:8146 + tail: true + wait-for: 30s + log-output-if: true + + # db:init only seeds Postgres now; mirror the seeded payment rows into the + # fresh bulldozer-js store so the backend's payment reads aren't empty. + - name: Backfill Bulldozer from Postgres + run: pnpm run db:backfill-bulldozer-from-prisma + # Start backend ONLY on fallback port 8110 — primary port 8102 is intentionally left down # so the SDK exercises its fallback logic for every request. - name: Start stack-backend on fallback port (8110) diff --git a/package.json b/package.json index 996c3812d..d19f62d14 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "start:mcp": "pnpm pre && turbo run start --concurrency 99999 --filter=@hexclave/mcp", "start:dashboard": "pnpm pre && turbo run start --concurrency 99999 --filter=@hexclave/dashboard", "start:mock-oauth-server": "pnpm pre && turbo run start --concurrency 99999 --filter=@hexclave/mock-oauth-server", + "start:bulldozer": "pnpm pre && turbo run start --concurrency 99999 --filter=@hexclave/bulldozer-js", "lint": "pnpm pre && turbo run lint --continue -- --max-warnings=0", "release": "pnpm pre && release", "dotenv": "dotenv",