Files
hermes-agent/.github/workflows/catalog-tests.yml
Teknium 275b15fc35 ci: catalog-only PRs run the catalog tests instead of the full suite
A PR that changes only plugin-catalog entry YAML (plus contributor email
maps) ran all 23k Python tests on Linux, macOS and Windows, ~25 min, and
unrelated core flakes kept blocking one-file catalog additions.

The classifier now has a `catalog` lane. A diff made only of catalog entry
data turns `python` off and `catalog` on; ci.yaml then runs
catalog-tests.yml (every test file that reads the catalog or the email
maps, discovered by scripts/ci/catalog_test_files.py), plus the contributor
check. The lane is required by all-checks-pass whenever detect selects it.
plugin-catalog/README.md keeps the full suite (a docs-page test mirrors
it), and any non-catalog file in the diff brings the suite back. The
structural and pinned-source admission gates in plugin-catalog-ci.yml are
unchanged.
2026-10-16 04:37:07 -07:00

60 lines
1.9 KiB
YAML

name: Catalog tests
# The tests that read plugin-catalog entries and contributor email maps. ci.yaml
# calls this INSTEAD of the full Python suite when a PR changes only catalog
# entry data (the classifier's `catalog` lane): a one-entry PR used to run 23k
# tests on three OSes, where unrelated flakes blocked it. The structural and
# pinned-source admission gates stay in plugin-catalog-ci.yml.
#
# The test set is discovered, not listed: every test file outside tests/e2e that
# references the catalog or the email maps, so a new catalog test joins the lane
# by existing.
on:
workflow_call:
inputs:
commit:
description: Commit to test. Empty keeps the triggering commit.
type: string
default: ''
permissions:
contents: read
concurrency:
group: catalog-tests-${{ (github.ref_type == 'tag' || inputs.commit != '') && github.run_id || github.ref }}
cancel-in-progress: ${{ github.ref_type != 'tag' && inputs.commit == '' }}
jobs:
catalog-tests:
name: Catalog tests
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 15
steps:
- name: Checkout code
uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1
with:
ref: ${{ inputs.commit }}
persist-credentials: false
- name: Set up locked Python and test dependencies
uses: ./.github/actions/setup-pm
with:
extras: '[]'
test-environment: 'true'
prune-python-cache: true
- name: Run the catalog tests
env:
OPENROUTER_API_KEY: ""
OPENAI_API_KEY: ""
NOUS_API_KEY: ""
run: |
set -euo pipefail
mapfile -t FILES < <(python3 scripts/ci/catalog_test_files.py)
echo "Catalog test files (${#FILES[@]}):"; printf ' %s\n' "${FILES[@]}"
scripts/run_tests.sh "${FILES[@]}"
- name: Check the checkout is clean
uses: ./.github/actions/check-clean-worktree