mirror of
https://github.com/adobe/skills.git
synced 2026-09-19 08:06:09 +08:00
88d42d0cda
Agent-Id: agent-ae592f54-86cd-4f62-81a4-82dd19066249 Linked-Note-Id: 50bb8703-a92b-4c75-88bd-50ce0ada01bf
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
name: Validate Skills
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '24'
|
|
cache: 'npm'
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run validate
|
|
|
|
codeowners-coverage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Check CODEOWNERS covers all skill directories
|
|
run: |
|
|
codeowners=".github/CODEOWNERS"
|
|
if [ ! -f "$codeowners" ]; then
|
|
echo "::error::CODEOWNERS file not found at $codeowners"
|
|
exit 1
|
|
fi
|
|
|
|
missing=()
|
|
for dir in skills/*/*/; do
|
|
# Remove trailing slash for the lookup path
|
|
path="/${dir%/}"
|
|
if ! grep -q "^${path}[/ ]" "$codeowners"; then
|
|
missing+=("$path")
|
|
fi
|
|
done
|
|
|
|
if [ ${#missing[@]} -gt 0 ]; then
|
|
echo "::error::The following skill directories are not covered in CODEOWNERS:"
|
|
for p in "${missing[@]}"; do
|
|
echo " $p"
|
|
done
|
|
exit 1
|
|
fi
|
|
|
|
echo "All skill directories are covered in CODEOWNERS."
|