Skip to content

Commit bfa9c2d

Browse files
chore(ci): wire gittensory-engine and gittensory-miner path filters (#3599)
Closes #2297 Add engine/miner CI filters and conditional build/pack-check steps. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a172c48 commit bfa9c2d

2 files changed

Lines changed: 41 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
uiContract: ${{ steps.filter.outputs.uiContract }}
3434
mcp: ${{ steps.filter.outputs.mcp }}
3535
mcpCliHarness: ${{ steps.filter.outputs.mcpCliHarness }}
36+
engine: ${{ steps.filter.outputs.engine }}
37+
miner: ${{ steps.filter.outputs.miner }}
3638
rees: ${{ steps.filter.outputs.rees }}
3739
observability: ${{ steps.filter.outputs.observability }}
3840
steps:
@@ -86,6 +88,13 @@ jobs:
8688
- 'packages/gittensory-mcp/**'
8789
- 'scripts/check-mcp-package.mjs'
8890
- 'package-lock.json'
91+
engine:
92+
- 'packages/gittensory-engine/**'
93+
- 'package-lock.json'
94+
miner:
95+
- 'packages/gittensory-miner/**'
96+
- 'scripts/check-miner-package.mjs'
97+
- 'package-lock.json'
8998
# 6 of the 7 MCP CLI-cluster test files, and ONLY these 6, are truly self-contained w.r.t. root
9099
# src/**: verified by direct-import inspection that test/unit/mcp-cli-*.test.ts (5 files) and
91100
# their shared test/unit/support/mcp-cli-harness.ts import nothing but node:* builtins + vitest,
@@ -125,7 +134,7 @@ jobs:
125134
validate-code:
126135
name: validate-code
127136
needs: changes
128-
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' }}
137+
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' }}
129138
runs-on: ubuntu-latest
130139
timeout-minutes: 45
131140
env:
@@ -350,6 +359,15 @@ jobs:
350359
- name: MCP package check
351360
if: ${{ github.event_name == 'push' || needs.changes.outputs.mcp == 'true' }}
352361
run: npm run test:mcp-pack
362+
- name: Build engine package
363+
if: ${{ github.event_name == 'push' || needs.changes.outputs.engine == 'true' }}
364+
run: npm run build --workspace @jsonbored/gittensory-engine
365+
- name: Build miner CLI
366+
if: ${{ github.event_name == 'push' || needs.changes.outputs.miner == 'true' }}
367+
run: npm run build:miner
368+
- name: Miner package check
369+
if: ${{ github.event_name == 'push' || needs.changes.outputs.miner == 'true' }}
370+
run: npm run test:miner-pack
353371
# review-enrichment is not an npm workspace member (its own package-lock.json), so it needs its own
354372
# cache entry -- same restore/save-after-success pattern and fork/trusted key split as the root
355373
# install above, for the same reasons.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { readFileSync } from "node:fs";
2+
import { join } from "node:path";
3+
import { describe, expect, it } from "vitest";
4+
5+
const CI_PATH = join(process.cwd(), ".github/workflows/ci.yml");
6+
7+
describe("CI engine/miner path filters", () => {
8+
it("declares engine and miner filters with package paths", () => {
9+
const ci = readFileSync(CI_PATH, "utf8");
10+
expect(ci).toMatch(/engine:\s*\n\s*- 'packages\/gittensory-engine\/\*\*'/);
11+
expect(ci).toMatch(/miner:\s*\n\s*- 'packages\/gittensory-miner\/\*\*'/);
12+
expect(ci).toContain("scripts/check-miner-package.mjs");
13+
expect(ci).toContain("needs.changes.outputs.engine");
14+
expect(ci).toContain("needs.changes.outputs.miner");
15+
expect(ci).toContain("name: Build engine package");
16+
expect(ci).toContain("name: Build miner CLI");
17+
expect(ci).toContain("name: Miner package check");
18+
expect(ci).toContain("npm run build --workspace @jsonbored/gittensory-engine");
19+
expect(ci).toContain("npm run build:miner");
20+
expect(ci).toContain("npm run test:miner-pack");
21+
});
22+
});

0 commit comments

Comments
 (0)