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