|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + |
| 9 | +jobs: |
| 10 | + lint: |
| 11 | + name: Lint and Validate |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + steps: |
| 15 | + - name: Checkout repository |
| 16 | + uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Check for required files |
| 19 | + run: | |
| 20 | + echo "Checking required files..." |
| 21 | + |
| 22 | + # Check root files |
| 23 | + test -f README.md || (echo "Missing README.md" && exit 1) |
| 24 | + test -f LICENSE || (echo "Missing LICENSE" && exit 1) |
| 25 | + test -f AGENTS.md || (echo "Missing AGENTS.md" && exit 1) |
| 26 | + test -L CLAUDE.md || (echo "Missing CLAUDE.md symlink" && exit 1) |
| 27 | + |
| 28 | + # Check marketplace config |
| 29 | + test -f .claude-plugin/marketplace.json || (echo "Missing .claude-plugin/marketplace.json" && exit 1) |
| 30 | + |
| 31 | + # Check plugin config |
| 32 | + test -f plugins/webflow-skills/.claude-plugin/plugin.json || (echo "Missing plugin.json" && exit 1) |
| 33 | + |
| 34 | + echo "All required files present ✓" |
| 35 | +
|
| 36 | + - name: Validate skill structure |
| 37 | + run: | |
| 38 | + echo "Validating skills..." |
| 39 | + |
| 40 | + for skill_dir in plugins/webflow-skills/skills/*/; do |
| 41 | + skill_name=$(basename "$skill_dir") |
| 42 | + echo "Checking skill: $skill_name" |
| 43 | + |
| 44 | + # Check for SKILL.md |
| 45 | + test -f "${skill_dir}SKILL.md" || (echo "Missing SKILL.md in $skill_name" && exit 1) |
| 46 | + |
| 47 | + # Check SKILL.md has required frontmatter |
| 48 | + if ! grep -q "^name:" "${skill_dir}SKILL.md"; then |
| 49 | + echo "Missing 'name' in $skill_name/SKILL.md frontmatter" |
| 50 | + exit 1 |
| 51 | + fi |
| 52 | + |
| 53 | + if ! grep -q "^description:" "${skill_dir}SKILL.md"; then |
| 54 | + echo "Missing 'description' in $skill_name/SKILL.md frontmatter" |
| 55 | + exit 1 |
| 56 | + fi |
| 57 | + |
| 58 | + echo " ✓ $skill_name valid" |
| 59 | + done |
| 60 | + |
| 61 | + echo "All skills validated ✓" |
| 62 | +
|
| 63 | + count-skills: |
| 64 | + name: Count Skills |
| 65 | + runs-on: ubuntu-latest |
| 66 | + |
| 67 | + steps: |
| 68 | + - name: Checkout repository |
| 69 | + uses: actions/checkout@v4 |
| 70 | + |
| 71 | + - name: Count and list skills |
| 72 | + run: | |
| 73 | + echo "## Skills in Repository" >> $GITHUB_STEP_SUMMARY |
| 74 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 75 | + |
| 76 | + count=0 |
| 77 | + for skill_dir in plugins/webflow-skills/skills/*/; do |
| 78 | + if [ -f "${skill_dir}SKILL.md" ]; then |
| 79 | + skill_name=$(basename "$skill_dir") |
| 80 | + echo "- $skill_name" >> $GITHUB_STEP_SUMMARY |
| 81 | + count=$((count + 1)) |
| 82 | + fi |
| 83 | + done |
| 84 | + |
| 85 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 86 | + echo "**Total: $count skills**" >> $GITHUB_STEP_SUMMARY |
0 commit comments