feat: Add 5 user experience skills - iteration-controller, content-ge… #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| lint: | |
| name: Lint & Validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Validate Markdown files | |
| run: | | |
| echo "Validating Markdown files..." | |
| find . -name "*.md" -type f | head -20 | while read file; do | |
| if [ -f "$file" ]; then | |
| echo "Checking: $file" | |
| fi | |
| done | |
| - name: Check file structure | |
| run: | | |
| echo "Checking project structure..." | |
| test -f README.md || { echo "README.md missing"; exit 1; } | |
| test -f SKILLS-INDEX.md || { echo "SKILLS-INDEX.md missing"; exit 1; } | |
| test -d .trae/skills || { echo "Skills directory missing"; exit 1; } | |
| echo "Structure check passed!" | |
| - name: Validate skill files | |
| run: | | |
| echo "Validating skill files..." | |
| skill_count=$(find .trae/skills -name "SKILL.md" | wc -l) | |
| echo "Found $skill_count skill files" | |
| if [ "$skill_count" -lt 50 ]; then | |
| echo "Warning: Less than 50 skills found" | |
| fi | |
| - name: Check for broken links | |
| run: | | |
| echo "Checking for broken internal links..." | |
| grep -r "\[.*\](.*)" --include="*.md" . | head -20 || true | |
| validate-yaml: | |
| name: Validate YAML Files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install PyYAML | |
| run: pip install pyyaml | |
| - name: Validate YAML files | |
| run: | | |
| python -c " | |
| import yaml | |
| import glob | |
| import sys | |
| yaml_files = glob.glob('**/*.yaml', recursive=True) + glob.glob('**/*.yml', recursive=True) | |
| errors = [] | |
| for f in yaml_files: | |
| try: | |
| with open(f, 'r') as file: | |
| yaml.safe_load(file) | |
| print(f'✓ {f}') | |
| except Exception as e: | |
| errors.append(f'{f}: {e}') | |
| print(f'✗ {f}: {e}') | |
| if errors: | |
| sys.exit(1) | |
| print(f'\nValidated {len(yaml_files)} YAML files successfully!') | |
| " | |
| security-check: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Run Trivy vulnerability scanner | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| scan-type: 'fs' | |
| scan-ref: '.' | |
| format: 'table' | |
| exit-code: '0' | |
| ignore-unfixed: true | |
| severity: 'CRITICAL,HIGH' | |
| build-test: | |
| name: Build Test | |
| runs-on: ubuntu-latest | |
| needs: [lint, validate-yaml] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Generate skill statistics | |
| run: | | |
| echo "## Skill Statistics" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| Category | Count |" >> $GITHUB_STEP_SUMMARY | |
| echo "|----------|-------|" >> $GITHUB_STEP_SUMMARY | |
| skill_count=$(find .trae/skills -name "SKILL.md" | wc -l) | |
| echo "| Total Skills | $skill_count |" >> $GITHUB_STEP_SUMMARY | |
| prompt_count=$(find prompts -name "*.md" | wc -l) | |
| echo "| Prompts | $prompt_count |" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ Build test completed successfully!" | |
| notify: | |
| name: Notify Status | |
| runs-on: ubuntu-latest | |
| needs: [lint, validate-yaml, security-check, build-test] | |
| if: always() | |
| steps: | |
| - name: Check all jobs status | |
| run: | | |
| echo "## CI Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "All checks completed!" >> $GITHUB_STEP_SUMMARY |