-
Notifications
You must be signed in to change notification settings - Fork 1
115 lines (97 loc) · 3.21 KB
/
Copy pathci.yml
File metadata and controls
115 lines (97 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
npm ci
- name: Build project
run: |
npm run build
- name: Lint with ESLint
run: |
npm run lint
- name: Check code formatting with Prettier
run: |
npm run format -- --check
- name: Type checking with TypeScript
run: |
npm run type-check
- name: Test imports and basic functionality
run: |
# Test main server import
node -e "
import('./dist/src/readsb_mcp_server.js').then(() => {
console.log('✅ Main server imports successfully');
}).catch(err => {
console.error('❌ Main server import failed:', err);
process.exit(1);
});
"
- name: Check for hardcoded paths
run: |
# Check for hardcoded macOS paths, excluding the check itself and other expected files
if find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.json" -o -name "*.md" \) \
-not -path "./node_modules/*" \
-not -path "./.git/*" \
-not -path "./dist/*" \
-not -path "./.github/workflows/ci.yml" \
-exec grep -l "/Users/" {} \; | grep -v ".github/workflows/ci.yml"; then
echo "❌ Found hardcoded paths in source files"
exit 1
else
echo "✅ No hardcoded paths found"
fi
- name: Check for TODO/FIXME comments
run: |
if grep -r "TODO\|FIXME" . --exclude-dir=node_modules --exclude-dir=.git; then
echo "⚠️ Found TODO/FIXME comments (not blocking)"
else
echo "✅ No TODO/FIXME comments found"
fi
- name: Check for console.log statements
run: |
if grep -r "console\.log" src/ --exclude="setup_remote_config.ts"; then
echo "❌ Found console.log statements in src/ (should use logger)"
exit 1
else
echo "✅ No console.log statements found in src/"
fi
- name: Test MCP Bundle creation
run: |
# Install MCPB tool
npm install -g @anthropic-ai/mcpb
# Test bundle creation
mcpb pack .
# Verify bundle exists
if [ -f "adsb-mcp-server.mcpb" ]; then
echo "✅ Bundle created successfully"
ls -la adsb-mcp-server.mcpb
# Check bundle size (should be reasonable)
BUNDLE_SIZE=$(stat -c%s "adsb-mcp-server.mcpb")
if [ $BUNDLE_SIZE -lt 1000000 ]; then
echo "✅ Bundle size is reasonable: $BUNDLE_SIZE bytes"
else
echo "⚠️ Bundle size is large: $BUNDLE_SIZE bytes"
fi
# Verify manifest exists in bundle
unzip -l adsb-mcp-server.mcpb | grep manifest.json && echo "✅ Manifest found in bundle"
else
echo "❌ Bundle creation failed"
exit 1
fi