-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 2.17 KB
/
ci.yml
File metadata and controls
71 lines (62 loc) · 2.17 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
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
smoke:
name: Smoke tests (${{ matrix.os }}, node ${{ matrix.node }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: ['22', '24']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- name: Syntax-check all .mjs files
shell: bash
run: |
find . -name "*.mjs" -not -path "./node_modules/*" -print0 \
| xargs -0 -n1 node --check
- name: Run smoke tests
shell: bash
run: node --test tests/*.test.mjs
validate:
name: Validate plugin manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '22'
- name: Parse JSON manifests
run: |
for f in .claude-plugin/plugin.json .claude-plugin/marketplace.json \
.claude-plugin/settings.json .mcp.json hooks/hooks.json; do
echo "Parsing $f"
node -e "JSON.parse(require('fs').readFileSync('$f','utf8'))"
done
- name: Check version lockstep (plugin.json vs marketplace.json)
run: |
PLUGIN_VER=$(node -e "console.log(require('./.claude-plugin/plugin.json').version)")
MARKET_VER=$(node -e "console.log(require('./.claude-plugin/marketplace.json').plugins[0].version)")
echo "plugin.json: $PLUGIN_VER"
echo "marketplace plugins[0]: $MARKET_VER"
if [ "$PLUGIN_VER" != "$MARKET_VER" ]; then
echo "::error::Version mismatch between plugin.json ($PLUGIN_VER) and marketplace.json ($MARKET_VER). Bump both in lockstep."
exit 1
fi
- name: Install Claude Code CLI
run: |
curl -fsSL https://claude.ai/install.sh | bash
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: claude --version
run: claude --version
- name: claude plugin validate (strict)
run: claude plugin validate --strict .