mirror of
https://github.com/xr843/Master-skill.git
synced 2026-05-10 13:26:25 +00:00
c654e7440f
- Update test-fidelity.py to support must_not_contain and must_not_contain_first_turn fields for boundary/pressure tests - Add validate-fidelity.py for structural validation of all fidelity.jsonl files (no API needed) - Add GitHub Actions workflow: runs validate + dry-run on every push/PR touching prebuilt/scripts/prompts/tools Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: Validate & Test
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'prebuilt/**'
|
|
- 'scripts/**'
|
|
- 'prompts/**'
|
|
- 'tools/**'
|
|
pull_request:
|
|
paths:
|
|
- 'prebuilt/**'
|
|
- 'scripts/**'
|
|
- 'prompts/**'
|
|
- 'tools/**'
|
|
|
|
jobs:
|
|
validate:
|
|
name: Validate SKILL.md & fidelity structure
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: pip install requests pypinyin pyyaml
|
|
|
|
- name: Lint SKILL.md frontmatter
|
|
run: python scripts/validate.py --strict
|
|
|
|
- name: Validate fidelity.jsonl structure
|
|
run: python scripts/validate-fidelity.py
|
|
|
|
- name: Dry-run fidelity tests
|
|
run: python scripts/test-fidelity.py --all --dry-run
|
|
|
|
fidelity:
|
|
name: Fidelity tests (API)
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'workflow_dispatch'
|
|
needs: validate
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: pip install anthropic requests pypinyin
|
|
|
|
- name: Run fidelity tests
|
|
env:
|
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
run: python scripts/test-fidelity.py --all --json > fidelity-results.json
|
|
|
|
- name: Upload results
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: fidelity-results
|
|
path: fidelity-results.json
|