Skip to content

Commit 3da0402

Browse files
sugyanclaude
andauthored
ci: add build validation and fix claude-code dependency issue (#264)
* ci: add build validation and improve workflow structure - Add backend build step and CLI execution test to catch runtime errors - Use working-directory instead of cd commands for better readability - Detect issues like missing exports (e.g., AbortError) early in CI 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * ci: fix build failure by creating dummy frontend dist - Add dummy frontend/dist creation before backend build - Resolves copy-frontend.js existsSync check failure in CI - Maintains build validation functionality without requiring full frontend build 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: downgrade @anthropic-ai/claude-code to 1.0.90 to resolve AbortError export issue - Downgrade from 1.0.98 to 1.0.90 (last version with working AbortError export) - Update all dependency declarations: backend/package.json, frontend/package.json, backend/deno.json - Regenerate lock files for consistency - Resolves "does not provide an export named AbortError" runtime error 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent b447802 commit 3da0402

7 files changed

Lines changed: 48 additions & 33 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
backend:
1111
name: Backend
1212
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
working-directory: backend
1316
strategy:
1417
matrix:
1518
node-version: [20, 22, 24]
@@ -25,43 +28,55 @@ jobs:
2528
cache-dependency-path: backend/package-lock.json
2629

2730
- name: Install backend dependencies
28-
run: cd backend && npm ci
31+
run: npm ci
2932

3033
- name: Generate version.ts
31-
run: cd backend && node scripts/generate-version.js
34+
run: node scripts/generate-version.js
3235

3336
- name: Setup Deno
3437
uses: denoland/setup-deno@v2
3538
with:
3639
deno-version: v2.x
3740

3841
- name: Install and cache Deno dependencies
39-
run: cd backend && deno install && deno cache cli/deno.ts
42+
run: deno install && deno cache cli/deno.ts
4043

4144
- name: Format check (Deno)
42-
run: cd backend && deno task format:check
45+
run: deno task format:check
4346

4447
- name: Format check (Prettier)
45-
run: cd backend && npm run format:check
48+
run: npm run format:check
4649

4750
- name: Lint (Deno)
48-
run: cd backend && deno task lint
51+
run: deno task lint
4952

5053
- name: Lint (ESLint)
51-
run: cd backend && npm run lint
54+
run: npm run lint
5255

5356
- name: Type check (Deno)
54-
run: cd backend && deno task check
57+
run: deno task check
5558

5659
- name: Type check (TypeScript)
57-
run: cd backend && npm run typecheck
60+
run: npm run typecheck
5861

5962
- name: Test
60-
run: cd backend && npm run test
63+
run: npm run test
64+
65+
- name: Create dummy frontend dist for build
66+
run: mkdir -p ../frontend/dist && touch ../frontend/dist/dummy
67+
68+
- name: Build backend
69+
run: npm run build
70+
71+
- name: Test built CLI
72+
run: node dist/cli/node.js -h
6173

6274
frontend:
6375
name: Frontend
6476
runs-on: ubuntu-latest
77+
defaults:
78+
run:
79+
working-directory: frontend
6580
strategy:
6681
matrix:
6782
node-version: [20, 22, 24]
@@ -77,22 +92,22 @@ jobs:
7792
cache-dependency-path: frontend/package-lock.json
7893

7994
- name: Install dependencies
80-
run: cd frontend && npm ci
95+
run: npm ci
8196

8297
- name: Format check
83-
run: cd frontend && npm run format:check
98+
run: npm run format:check
8499

85100
- name: Lint
86-
run: cd frontend && npm run lint
101+
run: npm run lint
87102

88103
- name: Type check
89-
run: cd frontend && npm run typecheck
104+
run: npm run typecheck
90105

91106
- name: Test
92-
run: cd frontend && npm test
107+
run: npm test
93108

94109
- name: Build
95-
run: cd frontend && npm run build
110+
run: npm run build
96111

97112
# Summary job for branch protection rules
98113
ci-success:

backend/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"node:process": "node:process",
2525
"commander": "npm:commander@^14.0.0",
2626
"hono": "jsr:@hono/hono@^4.8.5",
27-
"@anthropic-ai/claude-code": "npm:@anthropic-ai/claude-code@1.0.98",
27+
"@anthropic-ai/claude-code": "npm:@anthropic-ai/claude-code@1.0.90",
2828
"@logtape/logtape": "jsr:@logtape/logtape@^1.0.0",
2929
"@logtape/pretty": "jsr:@logtape/pretty@^1.0.0"
3030
}

backend/deno.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"prepublishOnly": "npm run build && npm run test"
5555
},
5656
"dependencies": {
57-
"@anthropic-ai/claude-code": "1.0.98",
57+
"@anthropic-ai/claude-code": "1.0.90",
5858
"@hono/node-server": "^1.0.0",
5959
"@logtape/logtape": "^1.0.0",
6060
"@logtape/pretty": "^1.0.0",
@@ -74,6 +74,6 @@
7474
"vitest": "^2.0.0"
7575
},
7676
"peerDependencies": {
77-
"@anthropic-ai/claude-code": "1.0.98"
77+
"@anthropic-ai/claude-code": "1.0.90"
7878
}
7979
}

frontend/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"react-router-dom": "^7.6.2"
2929
},
3030
"devDependencies": {
31-
"@anthropic-ai/claude-code": "1.0.98",
31+
"@anthropic-ai/claude-code": "1.0.90",
3232
"@eslint/js": "^9.25.0",
3333
"@playwright/test": "^1.48.2",
3434
"@tailwindcss/vite": "^4.1.8",

0 commit comments

Comments
 (0)