-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.62 KB
/
Copy pathvalidate.yml
File metadata and controls
48 lines (40 loc) · 1.62 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
name: Validate Plugin
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate plugin.json syntax
run: python3 -c "import json; json.load(open('.claude-plugin/plugin.json'))"
- name: Validate hooks.json syntax
run: python3 -c "import json; json.load(open('hooks/hooks.json'))"
- name: Check required plugin.json fields
run: |
python3 -c "
import json
data = json.load(open('.claude-plugin/plugin.json'))
required = ['name', 'description', 'version', 'license']
for field in required:
assert field in data, f'Missing required field: {field}'
print('All required fields present')
"
- name: Check SKILL.md frontmatter
run: |
for f in skills/*/SKILL.md; do
echo "Checking $f"
head -1 "$f" | grep -q "^---" || (echo "Missing frontmatter in $f" && exit 1)
done
- name: Validate hook script is executable
run: test -x hooks/task-intercept.sh
- name: Validate hook script outputs valid JSON
run: bash hooks/task-intercept.sh | python3 -c "import json, sys; json.load(sys.stdin)"
- name: Validate version matches CHANGELOG
run: |
VERSION=$(python3 -c "import json; print(json.load(open('.claude-plugin/plugin.json'))['version'])")
grep -q "\[${VERSION}\]" CHANGELOG.md || (echo "Version $VERSION not found in CHANGELOG.md" && exit 1)
echo "Version $VERSION found in CHANGELOG.md"