| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- name: CI
- on:
- push:
- branches:
- - main
- pull_request:
- paths:
- - ".github/workflows/tests.yml"
- - "Makefile"
- - "pyproject.toml"
- - "uv.lock"
- - "src/**"
- - "tests/**"
- - "examples/**"
- env:
- UV_FROZEN: "1"
- jobs:
- lint:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Set up uv (3.13)
- uses: astral-sh/setup-uv@v5
- with:
- enable-cache: true
- python-version: "3.13"
- - name: Install dependencies
- run: make sync
- - name: Run lint
- run: make lint
- typecheck:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Set up uv (3.13)
- uses: astral-sh/setup-uv@v5
- with:
- enable-cache: true
- python-version: "3.13"
- - name: Install dependencies
- run: make sync
- - name: Run mypy
- run: make mypy
- tests:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Set up uv (Python 3.13)
- uses: astral-sh/setup-uv@v5
- with:
- enable-cache: true
- python-version: "3.13"
- - name: Install dependencies
- run: make sync
- - name: Run tests with coverage
- if: github.event_name != 'pull_request' || (github.event.pull_request.user.login != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork)
- env:
- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- run: make coverage
- - name: Run unit tests for PRs without secrets
- if: github.event_name == 'pull_request' && (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.head.repo.fork)
- run: uv run pytest tests/test_*_modules
- tests_py312:
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Set up uv (Python 3.12)
- uses: astral-sh/setup-uv@v5
- with:
- enable-cache: true
- python-version: "3.12"
- - name: Install dependencies
- run: make sync
- - name: Run tests with coverage (3.12)
- env:
- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- run: make coverage
|