ci: add notebook CI/CD with validation and testing #9
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: Claude Model Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| paths: | |
| - 'skills/**/*.ipynb' | |
| - '**.py' | |
| - '**.md' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| model-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Setup Python | |
| run: uv python install 3.11 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Check models with script | |
| id: model_check | |
| run: | | |
| uv run python scripts/check_models.py --github-output || true | |
| # Only run Claude validation for repo members (API costs) | |
| - name: Claude Model Validation | |
| if: | | |
| github.event.pull_request.author_association == 'MEMBER' || | |
| github.event.pull_request.author_association == 'OWNER' | |
| uses: anthropics/claude-code-action@beta | |
| with: | |
| use_sticky_comment: true | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| timeout_minutes: "5" | |
| direct_prompt: | | |
| Review the changed files for Claude model usage. | |
| Check the latest models at: https://docs.anthropic.com/en/docs/about-claude/models/overview.md | |
| Please check for: | |
| 1. Any internal/non-public model names | |
| 2. Usage of deprecated models (older Sonnet 3.5 and Opus 3 models) | |
| 3. Recommend using aliases for better maintainability | |
| 4. For testing examples, suggest claude-3-5-haiku-latest (fastest/cheapest) | |
| Format as actionable feedback. |