Skip to content

build(deps): bump openai-agents from 0.13.1 to 0.18.2 #1531

build(deps): bump openai-agents from 0.13.1 to 0.18.2

build(deps): bump openai-agents from 0.13.1 to 0.18.2 #1531

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Create venv and install pre-commit
run: |
uv venv
source .venv/bin/activate
uv pip install pre-commit
- name: Cache pre-commit hooks
uses: actions/cache@v5
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit checks
run: |
source .venv/bin/activate
pre-commit run --all-files
- name: Check if changes were made
run: |
if ! git diff --quiet; then
echo "::error::Code formatting issues found. Run pre-commit locally and commit changes."
git diff
exit 1
fi
# Test the main corral package
test-main:
needs: code-quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
lfs: true
- name: Ensure Git LFS is initialized
run: |
git lfs install
# Try to pull LFS objects, but don't fail if some are missing
git lfs pull --exclude="" || echo "Some LFS objects missing, continuing..."
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install root project
run: uv sync --all-extras --dev
- name: Run root project tests
run: uv run pytest tests
# Discover and test all tasks
discover-tasks:
needs: code-quality
runs-on: ubuntu-latest
outputs:
tasks: ${{ steps.discover.outputs.tasks }}
steps:
- uses: actions/checkout@v6
- name: Discover tasks with tests
id: discover
run: |
# Find all directories in tasks/ that have both pyproject.toml and tests/
tasks=$(find tasks -maxdepth 1 -type d -name "*" | while read task_dir; do
if [[ -f "$task_dir/pyproject.toml" ]] && [[ -d "$task_dir/tests" ]]; then
echo "$(basename "$task_dir")"
fi
done | jq -R -s -c 'split("\n")[:-1]')
echo "tasks=$tasks" >> $GITHUB_OUTPUT
echo "Found tasks with tests: $tasks"
# Test each task in parallel
test-tasks:
needs: [discover-tasks, test-main]
runs-on: ubuntu-latest
strategy:
fail-fast: false # Don't stop other tasks if one fails
matrix:
task: ${{ fromJson(needs.discover-tasks.outputs.tasks) }}
steps:
- uses: actions/checkout@v6
with:
lfs: true
- name: Ensure Git LFS is initialized
run: |
git lfs install
# Try to pull LFS objects, but don't fail if some are missing , this is because md environment has big files
git lfs pull --exclude="" || echo "Some LFS objects missing, continuing..."
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install root project (corral)
run: uv sync --all-extras --dev
- name: Install task dependencies
run: |
# Install the task package in development mode
uv pip install -e .
working-directory: ./tasks/${{ matrix.task }}
- name: Run task tests
run: |
# Set CORRAL_WORK_DIR for tests that need it
export CORRAL_WORK_DIR=$(mktemp -d)
# Run tests using uv run and ensure pytest uses the local config
uv run python -m pytest tests -v --rootdir=.
working-directory: ./tasks/${{ matrix.task }}
# Discover tasks with env.py files for server setup checking
discover-env-tasks:
needs: code-quality
runs-on: ubuntu-latest
outputs:
tasks: ${{ steps.discover.outputs.tasks }}
steps:
- uses: actions/checkout@v6
- name: Discover tasks with env.py (excluding those requiring special setup)
id: discover
run: |
# Excluded tasks:
# retrosynthesis - requires a running database
# afm - requires nanosurf (Windows-only hardware library)
# wetlab - requires reaktoro (conda-only, not on PyPI)
# samplemath - uses bare imports incompatible with package-level import
EXCLUDED="retrosynthesis afm wetlab samplemath"
tasks=$(find tasks -maxdepth 1 -type d | while read task_dir; do
task_name=$(basename "$task_dir")
if [[ "$task_name" == "tasks" ]]; then continue; fi
if echo "$EXCLUDED" | grep -qw "$task_name"; then continue; fi
if [[ ! -f "$task_dir/pyproject.toml" ]]; then continue; fi
if find "$task_dir" -name "env.py" -maxdepth 4 -type f | grep -q .; then
echo "$task_name"
fi
done | sort | jq -R -s -c 'split("\n")[:-1]')
echo "tasks=$tasks" >> $GITHUB_OUTPUT
echo "Found env tasks: $tasks"
# Check that each task's env server can be set up correctly
check-env-servers:
needs: [discover-env-tasks, code-quality]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
task: ${{ fromJson(needs.discover-env-tasks.outputs.tasks) }}
steps:
- uses: actions/checkout@v6
with:
lfs: true
- name: Ensure Git LFS is initialized
run: |
git lfs install
git lfs pull --exclude="" || echo "Some LFS objects missing, continuing..."
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install root project (corral)
run: uv sync --all-extras --dev
- name: Install task dependencies
run: uv pip install -e .
working-directory: ./tasks/${{ matrix.task }}
- name: Check env server setup
run: |
uv run python -c "from ${{ matrix.task }} import env; print('Server setup OK')"
working-directory: ./tasks/${{ matrix.task }}
# Summary job to check all results
test-summary:
needs: [test-main, test-tasks, check-env-servers]
runs-on: ubuntu-latest
if: always()
steps:
- name: Check test results
run: |
env_result="${{ needs.check-env-servers.result }}"
if [[ "${{ needs.test-main.result }}" == "success" ]] && \
[[ "${{ needs.test-tasks.result }}" == "success" ]] && \
[[ "$env_result" == "success" || "$env_result" == "skipped" ]]; then
echo "✅ All tests passed!"
else
echo "❌ Some tests failed:"
echo "Main tests: ${{ needs.test-main.result }}"
echo "Task tests: ${{ needs.test-tasks.result }}"
echo "Env server checks: $env_result"
exit 1
fi