From 312969d7ea1b4d2477d957094cb4d9a933e07fc5 Mon Sep 17 00:00:00 2001 From: Randy Wilson Date: Fri, 29 May 2026 10:42:16 -0400 Subject: [PATCH 1/2] ci: add GitHub Actions workflow (build + core tests, FalkorDB smoke) Hard gate builds all packages (tsc typecheck) and runs @codegraph/core, which is green without secrets. A non-blocking integration-smoke job runs graph + plugin-nlp against FalkorDB service containers in offline mode (CODEGRAPH_EMBEDDING_PROVIDER=none); it surfaces the suite's pre-existing failures without gating merges until they are triaged. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 101 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 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..e07a485 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,101 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + # Hard gate: must be green for a PR to merge. + # Builds every package (tsc, so this also typechecks the whole monorepo) + # and runs @codegraph/core's suite, which is green without any API keys + # or services. + build-and-test: + name: Build & unit tests + runs-on: ubuntu-latest + env: + # Documented offline/CI mode (see README): skip vector indexes so no + # embedding API key is required. + CODEGRAPH_EMBEDDING_PROVIDER: none + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 # version comes from package.json "packageManager" + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build all packages (also typechecks) + run: pnpm turbo build + + - name: Unit tests (core) + run: pnpm turbo test --filter=@codegraph/core + + # Non-blocking smoke run against a live FalkorDB. Surfaces graph/plugin-nlp + # status without gating merges, because the suite still has pre-existing + # failures that need triage (integration tests that require an embedding + # provider + LLM/Voyage credentials, a few legacy tests referencing removed + # APIs, and packages lacking --passWithNoTests). Once those are resolved, + # drop `continue-on-error` and fold these filters into build-and-test. + integration-smoke: + name: Integration smoke (FalkorDB, non-blocking) + runs-on: ubuntu-latest + continue-on-error: true + env: + CODEGRAPH_EMBEDDING_PROVIDER: none + FALKORDB_HOST: localhost + services: + falkordb: + image: falkordb/falkordb:latest + ports: + - 6379:6379 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 10 + cgbench-falkordb: + image: falkordb/falkordb:latest + ports: + - 6380:6379 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 10 + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build all packages + run: pnpm turbo build + + - name: Graph + NLP tests (informational) + run: pnpm turbo test --filter=@codegraph/graph --filter=@codegraph/plugin-nlp From f3fdc17d512eb3b8913ee975583339be46f8d710 Mon Sep 17 00:00:00 2001 From: Randy Wilson Date: Fri, 29 May 2026 10:47:26 -0400 Subject: [PATCH 2/2] ci: scope build to library packages, skip release-packaging build pnpm turbo build ran @codegraph/mcp#build, which shells out to the MCPB esbuild + native-module bundler (packages/npm-package/build.mjs:26) and fails in a clean checkout. That is a release/publish step, not a correctness gate. Build now excludes @codegraph/mcp and codegraph-landing (Vercel-covered); the smoke job lets turbo build only the deps its tests need. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e07a485..26f4686 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,8 +41,12 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Build all packages (also typechecks) - run: pnpm turbo build + - name: Build & typecheck library packages + # Excludes @codegraph/mcp (release-only esbuild + native-module + # packaging via packages/npm-package/build.mjs — not a correctness + # check, and needs a populated tree) and codegraph-landing (the + # marketing app, already gated by Vercel). Everything else is tsc. + run: pnpm turbo build --filter='!@codegraph/mcp' --filter='!codegraph-landing' - name: Unit tests (core) run: pnpm turbo test --filter=@codegraph/core @@ -94,8 +98,7 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Build all packages - run: pnpm turbo build - - name: Graph + NLP tests (informational) + # turbo builds the needed deps automatically (test depends on build); + # this never triggers the @codegraph/mcp packaging build. run: pnpm turbo test --filter=@codegraph/graph --filter=@codegraph/plugin-nlp