-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add comprehensive skill validation CI #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3c06ba2
feat: enhance validate-skill.sh with comprehensive checks
CybotTM dea7f07
feat: add reusable validate.yml workflow and validate job
CybotTM 7cdefdd
feat: add pre-commit hook for local validation
CybotTM 6a76eda
docs: add skill validation CI implementation plan
CybotTM File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Validate Skill | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| validate: | ||
| name: Skill Validation | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Harden Runner | ||
| uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0 | ||
| with: | ||
| egress-policy: audit | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Checkout validation script | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| repository: netresearch/skill-repo-skill | ||
| path: .validate-skill | ||
| sparse-checkout: skills/skill-repo/scripts/validate-skill.sh | ||
| sparse-checkout-cone-mode: false | ||
|
|
||
| - name: Run skill validation | ||
| run: bash .validate-skill/skills/skill-repo/scripts/validate-skill.sh . | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/usr/bin/env bash | ||
| # pre-commit hook: validate skill repo structure | ||
| # Installed via: git config core.hooksPath Build/hooks | ||
|
|
||
| SCRIPT="" | ||
| for f in scripts/validate-skill.sh skills/*/scripts/validate-skill.sh; do | ||
| [[ -f "$f" ]] && SCRIPT="$f" && break | ||
| done | ||
|
|
||
| if [[ -z "$SCRIPT" ]]; then | ||
| echo "No local validate-skill.sh found, skipping validation" | ||
| exit 0 | ||
| fi | ||
|
|
||
| bash "$SCRIPT" . |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow checks out
netresearch/skill-repo-skillwithout pinning aref. This makes validation non-deterministic (the script version can change independently of the reusable workflow ref that callers use) and can lead to unexpected failures. Consider checking out the validation script at the same ref as the reusable workflow (or documenting that it intentionally always tracks the default branch).