mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-11-15 15:50:35 +00:00
Bundled examples keep their behavior tests in backend/tests/, so the core backend workflow ran optional extension behavior on every pull request. Mark those suites with pytest.mark.bundled_extension, exclude them from the core shards and from the duration baseline, and run them in a dedicated workflow through make test-bundled-extensions. Tests of host mechanisms stay in the core shards even when an example package is the payload. The marked suites import deerflow.agents, config, runtime, knowledge and app.gateway, so the workflow triggers for backend/packages/**, backend/app/gateway/** and the marked test modules; a backend test pins those paths, the make target and both marker selections, and fails when a marked module is missing from the path list. Host/extension compatibility checks — a host API gate and authorization of contributed routes — live in test_extension_host_contracts.py so they still fail core CI. The committed duration baseline drops the 482 entries for the excluded suites. Refs #8173 Co-authored-by: REI-330 <173389910+REI-330@users.noreply.github.com> Co-authored-by: willem-bd <143703838+willem-bd@users.noreply.github.com> Co-authored-by: Eilen6316 <136898293+Eilen6316@users.noreply.github.com>
105 lines
4.1 KiB
YAML
105 lines
4.1 KiB
YAML
name: Bundled Extension Tests
|
|
|
|
# Bundled extension examples own their behavior suites, which carry the
|
|
# `bundled_extension` marker. The core backend shards exclude them so an
|
|
# optional example cannot fail an unrelated core PR; this workflow runs them
|
|
# whenever an example, the extension contract, the host they load into or the
|
|
# bundled tests change.
|
|
#
|
|
# The filter is deliberately bounded: the marked modules import `deerflow.*`
|
|
# (packages) and `app.gateway.*`, so only the Gateway subtree is listed rather
|
|
# than all of `backend/app`. Test files are listed one by one instead of
|
|
# `backend/tests/**`, and `test_bundled_extension_ci.py` fails when a module
|
|
# carries the marker without appearing here, so this list cannot drift.
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
paths:
|
|
- 'examples/deerflow-extension-*/**'
|
|
- 'backend/packages/**'
|
|
- 'backend/app/gateway/**'
|
|
- 'backend/tests/conftest.py'
|
|
- 'backend/tests/support/**'
|
|
- 'backend/tests/test_agent_teams_plugin.py'
|
|
- 'backend/tests/test_bookmark_plugin.py'
|
|
- 'backend/tests/test_bundled_extension_ci.py'
|
|
- 'backend/tests/test_jev_classify_extension.py'
|
|
- 'backend/tests/test_jev_context_extension.py'
|
|
- 'backend/tests/test_jev_result_screening_extension.py'
|
|
- 'backend/tests/test_jev_screening_pipeline.py'
|
|
- 'backend/tests/test_jev_screening_policy.py'
|
|
- 'backend/tests/test_knowledge_center_extension.py'
|
|
- 'backend/tests/test_knowledge_management_extension.py'
|
|
- 'backend/tests/test_knowledge_platform_extension.py'
|
|
- 'backend/tests/test_lightrag_relations_extension.py'
|
|
- 'backend/tests/test_report_sections_extension.py'
|
|
- 'backend/tests/test_retrieval_plugin_artifacts.py'
|
|
- 'backend/tests/test_weknora_extension.py'
|
|
- 'backend/tests/test_workflow_plugin.py'
|
|
- 'backend/pyproject.toml'
|
|
- 'backend/uv.lock'
|
|
- 'backend/Makefile'
|
|
- '.github/workflows/bundled-extension-tests.yml'
|
|
push:
|
|
branches: [main, "*-dev"]
|
|
paths:
|
|
- 'examples/deerflow-extension-*/**'
|
|
- 'backend/packages/**'
|
|
- 'backend/app/gateway/**'
|
|
- 'backend/tests/conftest.py'
|
|
- 'backend/tests/support/**'
|
|
- 'backend/tests/test_agent_teams_plugin.py'
|
|
- 'backend/tests/test_bookmark_plugin.py'
|
|
- 'backend/tests/test_bundled_extension_ci.py'
|
|
- 'backend/tests/test_jev_classify_extension.py'
|
|
- 'backend/tests/test_jev_context_extension.py'
|
|
- 'backend/tests/test_jev_result_screening_extension.py'
|
|
- 'backend/tests/test_jev_screening_pipeline.py'
|
|
- 'backend/tests/test_jev_screening_policy.py'
|
|
- 'backend/tests/test_knowledge_center_extension.py'
|
|
- 'backend/tests/test_knowledge_management_extension.py'
|
|
- 'backend/tests/test_knowledge_platform_extension.py'
|
|
- 'backend/tests/test_lightrag_relations_extension.py'
|
|
- 'backend/tests/test_report_sections_extension.py'
|
|
- 'backend/tests/test_retrieval_plugin_artifacts.py'
|
|
- 'backend/tests/test_weknora_extension.py'
|
|
- 'backend/tests/test_workflow_plugin.py'
|
|
- 'backend/pyproject.toml'
|
|
- 'backend/uv.lock'
|
|
- 'backend/Makefile'
|
|
- '.github/workflows/bundled-extension-tests.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: bundled-extension-tests-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
bundled-extension-tests:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- uses: astral-sh/setup-uv@v7
|
|
with:
|
|
# Must match backend/Dockerfile's UV_IMAGE tag; pinned by backend/tests/test_ci_uv_version_pin.py
|
|
version: "0.11.1"
|
|
|
|
- name: Install backend dependencies
|
|
working-directory: backend
|
|
run: uv sync --group dev
|
|
|
|
- name: Run bundled extension behavior tests
|
|
working-directory: backend
|
|
run: make test-bundled-extensions
|