-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.52 KB
/
validate.yml
File metadata and controls
59 lines (50 loc) · 1.52 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
name: Validate Plugin Structure
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate plugin.json
run: python3 -c "import json; json.load(open('.cursor-plugin/plugin.json'))"
- name: Check directories exist
run: |
test -d skills
test -d rules
test -f assets/logo.png
- name: Validate skill frontmatter
run: |
for dir in skills/*/; do
skill_name=$(basename "$dir")
skill_file="$dir/SKILL.md"
if [ ! -f "$skill_file" ]; then
echo "FAIL: Missing SKILL.md in $dir"
exit 1
fi
if ! head -1 "$skill_file" | grep -q "^---"; then
echo "FAIL: $skill_file missing YAML frontmatter"
exit 1
fi
echo "OK: $skill_file"
done
- name: Validate rule frontmatter
run: |
for rule_file in rules/*.mdc; do
if ! head -1 "$rule_file" | grep -q "^---"; then
echo "FAIL: $rule_file missing YAML frontmatter"
exit 1
fi
echo "OK: $rule_file"
done
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install test dependencies
run: pip install -r requirements-test.txt
- name: Run structure tests
run: pytest tests/ -v --tb=short