avoigt1121
Claude Opus 5.5
feat: governed ToolUniverse core for the knowledge specialist (s1)
377417d
Raw History Blame Contribute Delete
2.67 kB
# The test suite and the formatting check, run on the GitHub mirror (copied from pdac-spatial-agent,
# where a repo with no workflow let an unformatted file sit for three days).
#
# WHERE IT RUNS. Once the Spaces exist, `origin` IS the HuggingFace prod Space and `hf-dev` the dev
# Space; HuggingFace does not execute GitHub Actions, so this only ever runs via the `github` mirror,
# which deploys nothing.
#
# WHY IT NEEDS NO SECRETS. `tests/conftest.py` blocks outbound sockets before collection and removes
# every model-provider variable, so the suite is hermetic by enforcement. Install-time network is
# still required (PyPI). If this job ever starts needing a token, that is a regression in the guard,
# not a missing secret.
name: tests
on:
pull_request:
push:
branches: [main, dev]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
# Separate from pytest on purpose: a style failure and a test failure are different news, and
# folding them together hides one behind the other. Safe to gate only because the repo is
# formatted from its first commit — a check that fails on day one is one people learn to ignore.
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install ruff (pinned — see requirements-dev.txt)
run: pip install "$(grep '^ruff==' requirements-dev.txt)"
- name: Check formatting
# `format --check` only. `ruff check` (lint) is not gated: it still has pre-existing
# findings across files no single lane owns, and gating that would fail on day one.
run: ruff format --check .
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
# Matches `python_version` in the README front-matter — CI should run what the Space
# runs. Note this is 3.12 where most of the fleet is 3.11; that is this Space's setting,
# not a copy-paste slip.
python-version: "3.12"
cache: pip
cache-dependency-path: |
requirements.txt
requirements-dev.txt
- name: Install deps
# The whole pinned set plus pytest. ToolUniverse (~100 packages) makes this the slow step; the
# pip cache above is what keeps it from being slow every time.
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Run the suite
run: python -m pytest tests/ -q