1+ name : TypeScript Build Check
2+
3+ on :
4+ push :
5+ branches : [ main, master, dev ]
6+ pull_request :
7+ branches : [ main, master ]
8+ workflow_dispatch : # Возможность запуска вручную
9+
10+ jobs :
11+ build :
12+ name : Bun Build Check
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Setup Bun
20+ uses : oven-sh/setup-bun@v1
21+ with :
22+ bun-version : latest
23+
24+ - name : Install dependencies
25+ run : bun install
26+
27+ - name : Validate tsconfig.json
28+ run : |
29+ echo "Validating tsconfig.json..."
30+ bun x tsc -p tsconfig.json --noEmit --listFiles
31+
32+ - name : Check TypeScript code
33+ run : |
34+ echo "Running type check..."
35+ bun x tsc --noEmit
36+
37+ - name : Run comprehensive type check
38+ run : |
39+ echo "Running comprehensive type check..."
40+ bun x tsc --noEmit --skipLibCheck false --project tsconfig.json
41+
42+ - name : Check for circular dependencies
43+ run : |
44+ echo "Checking for circular dependencies..."
45+ bun x madge --circular --extensions ts ./
46+ continue-on-error : true
47+
48+ - name : Check code style with ESLint (if present)
49+ run : |
50+ if [ -f ".eslintrc.js" ] || [ -f ".eslintrc.json" ] || [ -f ".eslintrc.yml" ]; then
51+ echo "ESLint configuration found, running check..."
52+ bun x eslint . --ext .ts
53+ else
54+ echo "No ESLint configuration found, skipping code style check."
55+ fi
56+ continue-on-error : true
57+
58+ - name : Report status
59+ run : |
60+ echo "TypeScript build check completed!"
61+ echo "All checks have passed successfully."
0 commit comments