-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (62 loc) · 2.01 KB
/
ci.yml
File metadata and controls
73 lines (62 loc) · 2.01 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm ci
working-directory: cli-tool
- name: Syntax check
run: |
node --check src/index.js
node --check src/setup.js
for f in src/data/*.js src/lib/*.js; do node --check "$f"; done
working-directory: cli-tool
- name: Run tests
run: npm test
working-directory: cli-tool
- name: Verify agent count
run: |
COUNT=$(grep "category:" src/data/agents.js | grep "value:" | wc -l)
echo "Agent count: $COUNT"
if [ "$COUNT" -lt 108 ]; then
echo "❌ Expected at least 108 agents, found $COUNT"
exit 1
fi
echo "✅ Agent count OK"
working-directory: cli-tool
- name: Verify skill count
run: |
COUNT=$(awk '/^export const AVAILABLE_SKILLS/,/^];/' src/data/skills.js | grep "value:" | wc -l)
echo "Skill count: $COUNT"
if [ "$COUNT" -lt 15 ]; then
echo "❌ Expected at least 15 skills, found $COUNT"
exit 1
fi
echo "✅ Skill count OK"
working-directory: cli-tool
- name: Verify templates synced
run: |
REPO_AGENTS=$(ls ../templates/agents/*.md | wc -l)
CLI_AGENTS=$(ls templates/agents/*.md | wc -l)
echo "Repo agents: $REPO_AGENTS, CLI agents: $CLI_AGENTS"
if [ "$REPO_AGENTS" -ne "$CLI_AGENTS" ]; then
echo "❌ Templates out of sync! Run: node scripts/sync-templates.js"
exit 1
fi
echo "✅ Templates in sync"
working-directory: cli-tool
- name: Dry-run pack
run: npm pack --dry-run
working-directory: cli-tool