chore: add production readiness test script #1
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
| # Overtime-ag-plugin tests (pytest + replay smoke) | |
| # Runs on push/PR when plugin files change, or on workflow_dispatch | |
| name: Overtime-ag-plugin tests | |
| on: | |
| push: | |
| paths: | |
| - '.claude/plugins/overtime-ag-plugin/**' | |
| - '.github/workflows/overtime-ag-tests.yml' | |
| pull_request: | |
| paths: | |
| - '.claude/plugins/overtime-ag-plugin/**' | |
| - '.github/workflows/overtime-ag-tests.yml' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: pytest + replay smoke | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: .claude/plugins/overtime-ag-plugin/project | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Sync dependencies | |
| run: uv sync --extra dev | |
| - name: Run pytest | |
| run: uv run pytest tests/ -v --tb=short | |
| - name: Replay-only smoke test | |
| run: | | |
| if [ -f data/cbb_recording.json ]; then | |
| uv run overtime-ag-scrape --advanced-mode --replay-only \ | |
| --recording data/cbb_recording.json --out data/cbb_test.json --log-level INFO | |
| if [ ! -f data/cbb_test.json ]; then | |
| echo "FAIL: replay did not produce data/cbb_test.json" | |
| exit 1 | |
| fi | |
| echo "OK: replay produced cbb_test.json ($(wc -c < data/cbb_test.json) bytes)" | |
| else | |
| echo "SKIP: data/cbb_recording.json not found (run record-cbb skill locally)" | |
| fi |