ci: add cli smoke checks #11
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: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| name: Lint & Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Ruff lint | |
| run: uv run ruff check . | |
| - name: Ruff format check | |
| run: uv run ruff format --check . | |
| test: | |
| name: Tests (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Run unit tests | |
| run: uv run pytest tests/ -v --tb=short --cov=igenbench --cov-report=term-missing --cov-report=xml | |
| - name: Upload coverage report | |
| if: matrix.python-version == '3.12' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage.xml | |
| smoke: | |
| name: CLI Smoke | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Check CLI entry points | |
| run: | | |
| uv run igenbench --help | |
| uv run igenbench gen --help | |
| uv run igenbench eval --help | grep "gemini-2.5-pro" | |
| uv run igenbench batch-eval --help | grep "gemini-2.5-pro" | |
| uv run igenbench score --help | |
| - name: Score fixture output | |
| run: | | |
| mkdir -p smoke-output/test-001 | |
| cp tests/fixtures/sample_item.json smoke-output/test-001/test-001.json | |
| uv run igenbench score \ | |
| --output-dir smoke-output \ | |
| --gen-model gemini-2.5-flash-image \ | |
| --eval-model gemini-2.5-pro \ | |
| --by-source \ | |
| --by-type |