Skip to content

Fixing ToolSelector handling finish_reason properly #144

Fixing ToolSelector handling finish_reason properly

Fixing ToolSelector handling finish_reason properly #144

Workflow file for this run

name: Lint and Test
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' # pre-commit-ci/lite-action only runs here
strategy:
matrix:
python-version: [3.11, 3.12] # Our min and max supported Python versions
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: pre-commit/action@v3.0.1
- uses: pre-commit-ci/lite-action@v1.0.3
if: always()
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11, 3.12] # Our min and max supported Python versions
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: |-
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python pin ${{ matrix.python-version }}
- run: uv sync --python-preference=only-managed
- name: Run refurb
run: | # Go with this until https://github.com/astral-sh/uv/issues/6459
cd src
uv run refurb .
cd ../packages/gsm8k/src
uv run refurb .
cd ../../hotpotqa/src
uv run refurb .
cd ../../..
uv run refurb tests packages/gsm8k/tests packages/hotpotqa/tests
- run: uv run pylint src packages
test:
runs-on: large-runner
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv sync
- name: Cache datasets
uses: actions/cache@v4
with:
path: ~/.cache/huggingface/datasets
key: ${{ runner.os }}-datasets-${{ hashFiles('packages/gsm8k') }}-${{ hashFiles('packages/hotpotqa') }}
restore-keys: ${{ runner.os }}-datasets-
- run: uv run pytest -n 16 --dist=loadfile # auto only launches 8 workers in CI, despite runners have 16 cores
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}