Skip to content

fix(tests): remove duplicate test_python_function_adapter_non_dict_structured_raises #67

fix(tests): remove duplicate test_python_function_adapter_non_dict_structured_raises

fix(tests): remove duplicate test_python_function_adapter_non_dict_structured_raises #67

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Cancel in-flight CI for the same branch when a new commit lands.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# Pin uv for reproducibility; bump deliberately, not drive-by.
UV_VERSION: "0.5.18"
PYTHONDONTWRITEBYTECODE: "1"
PYTHONUNBUFFERED: "1"
jobs:
test:
name: pytest (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install eval-harness with testable extras
# postgres extra deliberately omitted — there's no service container
# in scope for v0.2 and the parametrized trace-store tests skip
# cleanly when the backend isn't built.
run: |
uv sync --extra anthropic --extra sqlite --extra git --no-dev
uv pip install pytest pytest-asyncio pytest-cov respx ruff mypy types-PyYAML
- name: ruff check
run: uv run --no-sync ruff check .
- name: detect docker
id: docker_check
# Sets an output flag; the next step decides whether to exclude the
# @pytest.mark.docker tests. When docker IS available those tests run
# and fail loudly on regressions (per ev-yry). When it's not, we
# explicitly exclude them — the marker is the gate.
run: |
if command -v docker >/dev/null 2>&1 && docker info >/dev/null 2>&1; then
echo "available=1" >> "$GITHUB_OUTPUT"
else
echo "available=0" >> "$GITHUB_OUTPUT"
fi
- name: pytest
# `not perf` skips the perf-marked tests reserved for the v0.2
# streaming/10K-case bead. `not docker` is OR'd in only when no
# Docker daemon is reachable; with Docker present, the
# docker_volume sandbox tests run.
# `not s3` is always OR'd in for CI — the s3 ObjectStorage test
# (ev-d6m) needs moto[server] + s3fs locally; CI's standard
# extras don't pull those, and the test deliberately skips
# rather than fails loudly when the marker is excluded.
run: |
if [ "${{ steps.docker_check.outputs.available }}" = "1" ]; then
uv run --no-sync pytest tests/ -q -m "not perf and not s3 and not modal and not celery"
else
uv run --no-sync pytest tests/ -q -m "not perf and not docker and not s3 and not modal and not celery"
fi
distributed:
# Distributed-executor markers that CAN run in CI: Celery (against a
# Redis service container). Ray, Modal, and Kubernetes need real
# infrastructure — Ray workers can't fork inside GHA's runner even
# with a reduced plasma-store size; see docs/Executors.md for the
# local-run recipes.
name: distributed executors (celery)
runs-on: ubuntu-latest
services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
# Health-check so subsequent steps don't race the broker boot.
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 10
env:
# The CeleryExecutor tests gate on this — set it once, here, so the
# @pytest.mark.celery suite picks Redis up; absence skips cleanly
# everywhere else.
EVALH_TEST_REDIS_URL: redis://localhost:6379/0
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Set up Python 3.11
run: uv python install 3.11
- name: Install eval-harness with distributed extras
# Celery is the only distributed extra with a viable CI smoke.
# Ray, Modal, and Kubernetes need infrastructure CI doesn't
# provide; docs/Executors.md covers the local-run recipes.
run: |
uv sync --extra anthropic --extra sqlite --extra celery --no-dev
uv pip install pytest pytest-asyncio pytest-cov respx ruff mypy types-PyYAML
- name: pytest -m celery
run: uv run --no-sync pytest tests/ -q -m celery
typecheck:
name: mypy --strict (py3.11)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Set up Python 3.11
run: uv python install 3.11
- name: Install eval-harness with testable extras
run: |
uv sync --extra anthropic --extra sqlite --extra git --no-dev
uv pip install mypy types-PyYAML
- name: mypy --strict
run: uv run --no-sync mypy --strict eval_harness/