enable CV, add UTs, smoke tests and enable them in github #6
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: CI | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| run_smoke_tests: | |
| description: "Run smoke tests" | |
| type: boolean | |
| default: true | |
| smoke_agents: | |
| description: "Agents to smoke-test (space-separated, empty = all)" | |
| type: string | |
| default: "" | |
| jobs: | |
| unit-tests: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: uv sync --group dev | |
| - name: Run pytest | |
| run: uv run pytest tests/ -v --tb=short | |
| smoke-tests: | |
| name: Smoke tests | |
| runs-on: ubuntu-latest | |
| # Run on manual dispatch (when opted in) or on push/PR to main | |
| if: | | |
| (github.event_name == 'workflow_dispatch' && inputs.run_smoke_tests) || | |
| (github.event_name != 'workflow_dispatch' && github.ref == 'refs/heads/main') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Make scripts executable | |
| run: chmod +x run_local.sh smoke_test.sh | |
| - name: Run smoke tests | |
| run: | | |
| AGENTS="${{ inputs.smoke_agents }}" | |
| if [ -n "$AGENTS" ]; then | |
| bash smoke_test.sh $AGENTS | |
| else | |
| bash smoke_test.sh | |
| fi |