Skip to content

feat: evals

feat: evals #187

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Check format
run: uvx ruff format --check .
- name: Lint
run: uvx ruff check .
types:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Type check
run: uvx mypy --strict protest
test:
needs: lint
strategy:
fail-fast: false
matrix:
include:
# Linux: all Python versions
- os: ubuntu-latest
python-version: "3.10"
- os: ubuntu-latest
python-version: "3.11"
- os: ubuntu-latest
python-version: "3.12"
- os: ubuntu-latest
python-version: "3.13"
- os: ubuntu-latest
python-version: "3.14"
# Windows: single version for OS-specific bugs (paths, signals, etc.)
- os: windows-latest
python-version: "3.12"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --dev
- name: Run tests
if: matrix.os != 'ubuntu-latest' || matrix.python-version != '3.12'
run: uv run pytest -vv
- name: Run tests with coverage
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
run: uv run pytest -vv --cov=protest --cov-report=term --cov-report=xml
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
fail_ci_if_error: false
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
run: uv sync --group docs
- name: Build docs
run: uv run mkdocs build --strict
test-summary:
needs: test
runs-on: ubuntu-latest
if: always()
steps:
- name: All tests passed
run: |
if [ "${{ needs.test.result }}" != "success" ]; then
echo "One or more test matrix jobs failed."
exit 1
fi