Skip to content

Commit 89ee87c

Browse files
authored
🔨 Add auto web type check.
2 parents da73578 + 12c2fc0 commit 89ee87c

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Run Auto Web Type Check
2+
3+
concurrency:
4+
group: auto-web-type-check-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
runner_label_json:
11+
description: 'runner array in json format (e.g. ["ubuntu-latest"] or ["self-hosted"])'
12+
default: '["ubuntu-latest"]'
13+
pull_request:
14+
branches: [develop]
15+
paths:
16+
- 'frontend/**'
17+
- '.github/workflows/**'
18+
push:
19+
branches: [develop]
20+
paths:
21+
- 'frontend/**'
22+
- '.github/workflows/**'
23+
24+
jobs:
25+
type-check:
26+
runs-on: ${{ fromJson(github.event.inputs.runner_label_json || '["ubuntu-latest"]') }}
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Set up Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: '18'
35+
36+
- name: Install dependencies
37+
run: |
38+
cd frontend
39+
npm install
40+
41+
- name: Run TypeScript type check
42+
run: |
43+
cd frontend
44+
npm run type-check
45+
TYPE_CHECK_EXIT_CODE=$?
46+
47+
# Check if type check actually passed
48+
if [ $TYPE_CHECK_EXIT_CODE -ne 0 ]; then
49+
echo "❌ Type check failed with exit code $TYPE_CHECK_EXIT_CODE"
50+
exit $TYPE_CHECK_EXIT_CODE
51+
else
52+
echo "✅ Type check passed successfully."
53+
fi

frontend/const/knowledgeBase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const DOCUMENT_STATUS = {
1212
} as const;
1313

1414
// Non-terminal statuses (still processing)
15-
export const NON_TERMINAL_STATUSES = [
15+
export const NON_TERMINAL_STATUSES: string[] = [
1616
DOCUMENT_STATUS.WAIT_FOR_PROCESSING,
1717
DOCUMENT_STATUS.PROCESSING,
1818
DOCUMENT_STATUS.WAIT_FOR_FORWARDING,

0 commit comments

Comments
 (0)