Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
uiContract: ${{ steps.filter.outputs.uiContract }}
mcp: ${{ steps.filter.outputs.mcp }}
mcpCliHarness: ${{ steps.filter.outputs.mcpCliHarness }}
engine: ${{ steps.filter.outputs.engine }}
miner: ${{ steps.filter.outputs.miner }}
rees: ${{ steps.filter.outputs.rees }}
observability: ${{ steps.filter.outputs.observability }}
steps:
Expand Down Expand Up @@ -86,6 +88,13 @@ jobs:
- 'packages/gittensory-mcp/**'
- 'scripts/check-mcp-package.mjs'
- 'package-lock.json'
engine:
- 'packages/gittensory-engine/**'
- 'package-lock.json'
miner:
- 'packages/gittensory-miner/**'
- 'scripts/check-miner-package.mjs'
- 'package-lock.json'
# 6 of the 7 MCP CLI-cluster test files, and ONLY these 6, are truly self-contained w.r.t. root
# src/**: verified by direct-import inspection that test/unit/mcp-cli-*.test.ts (5 files) and
# their shared test/unit/support/mcp-cli-harness.ts import nothing but node:* builtins + vitest,
Expand Down Expand Up @@ -125,7 +134,7 @@ jobs:
validate-code:
name: validate-code
needs: changes
if: ${{ github.event_name == 'push' || needs.changes.outputs.backend == 'true' || needs.changes.outputs.mcp == 'true' || needs.changes.outputs.rees == 'true' || needs.changes.outputs.ui == 'true' || needs.changes.outputs.observability == 'true' }}
if: ${{ github.event_name == 'push' || needs.changes.outputs.backend == 'true' || needs.changes.outputs.mcp == 'true' || needs.changes.outputs.engine == 'true' || needs.changes.outputs.miner == 'true' || needs.changes.outputs.rees == 'true' || needs.changes.outputs.ui == 'true' || needs.changes.outputs.observability == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 45
env:
Expand Down Expand Up @@ -350,6 +359,15 @@ jobs:
- name: MCP package check
if: ${{ github.event_name == 'push' || needs.changes.outputs.mcp == 'true' }}
run: npm run test:mcp-pack
- name: Build engine package
if: ${{ github.event_name == 'push' || needs.changes.outputs.engine == 'true' }}
run: npm run build --workspace @jsonbored/gittensory-engine
- name: Build miner CLI
if: ${{ github.event_name == 'push' || needs.changes.outputs.miner == 'true' }}
run: npm run build:miner
- name: Miner package check
if: ${{ github.event_name == 'push' || needs.changes.outputs.miner == 'true' }}
run: npm run test:miner-pack
# review-enrichment is not an npm workspace member (its own package-lock.json), so it needs its own
# cache entry -- same restore/save-after-success pattern and fork/trusted key split as the root
# install above, for the same reasons.
Expand Down
22 changes: 22 additions & 0 deletions test/unit/ci-engine-miner-filters.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { readFileSync } from "node:fs";
import { join } from "node:path";
import { describe, expect, it } from "vitest";

const CI_PATH = join(process.cwd(), ".github/workflows/ci.yml");

describe("CI engine/miner path filters", () => {
it("declares engine and miner filters with package paths", () => {
const ci = readFileSync(CI_PATH, "utf8");
expect(ci).toMatch(/engine:\s*\n\s*- 'packages\/gittensory-engine\/\*\*'/);
expect(ci).toMatch(/miner:\s*\n\s*- 'packages\/gittensory-miner\/\*\*'/);
expect(ci).toContain("scripts/check-miner-package.mjs");
expect(ci).toContain("needs.changes.outputs.engine");
expect(ci).toContain("needs.changes.outputs.miner");
expect(ci).toContain("name: Build engine package");
expect(ci).toContain("name: Build miner CLI");
expect(ci).toContain("name: Miner package check");
expect(ci).toContain("npm run build --workspace @jsonbored/gittensory-engine");
expect(ci).toContain("npm run build:miner");
expect(ci).toContain("npm run test:miner-pack");
});
});
Loading