Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
77 lines
1.9 KiB
YAML
77 lines
1.9 KiB
YAML
name: web-search-agent tests
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "chapter1/web-search-agent/**"
|
|
# The chapter imports agentbook.providers, so a change there can break
|
|
# these tests without touching the chapter directory at all.
|
|
- "agentbook/**"
|
|
- "tests/**"
|
|
- "pyproject.toml"
|
|
- ".github/workflows/web-search-agent-tests.yml"
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "chapter1/web-search-agent/**"
|
|
- "agentbook/**"
|
|
- "tests/**"
|
|
- "pyproject.toml"
|
|
- ".github/workflows/web-search-agent-tests.yml"
|
|
workflow_dispatch: {}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: chapter1/web-search-agent
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
cache: pip
|
|
cache-dependency-path: chapter1/web-search-agent/requirements.txt
|
|
|
|
- name: Install dependencies
|
|
run: python -m pip install -r requirements.txt
|
|
|
|
- name: Check formatting
|
|
run: python -m black --check tests
|
|
|
|
- name: Run offline unit tests
|
|
env:
|
|
MOONSHOT_API_KEY: ""
|
|
KIMI_API_KEY: ""
|
|
OPENROUTER_API_KEY: ""
|
|
run: python -m pytest
|
|
|
|
# The shared provider registry has its own suite at the repository root.
|
|
# Without this job a change to agentbook/ could only be caught indirectly,
|
|
# via whichever chapter happened to import the broken code.
|
|
agentbook:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install the package
|
|
run: python -m pip install -e ".[dev]"
|
|
|
|
- name: Run registry tests
|
|
env:
|
|
MOONSHOT_API_KEY: ""
|
|
KIMI_API_KEY: ""
|
|
OPENROUTER_API_KEY: ""
|
|
run: python -m pytest tests -q
|