mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-10-26 13:16:24 +00:00
* fix(workspace): publish the snapshot text cache byte-exactly on every host * test(workspace): pin diff line counts and guard the text cache on Windows CI * ci(workspace): run Windows text-cache guards on source changes Include the workspace_changes package in the Windows workflow's PR path filter so scanner or diff regressions run the native Windows guards before merge, rather than waiting for the weekly schedule. --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
71 lines
2.6 KiB
YAML
71 lines
2.6 KiB
YAML
name: Windows Live Test Policy
|
|
|
|
# These offline policy tests spawn pytest children that collect live tests,
|
|
# and the workspace text-cache tests pin byte-exact cache round-trips whose
|
|
# regression only fails on native Windows (see test_scanner_text_cache_atomic).
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '17 6 * * 1'
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
paths:
|
|
- '.github/workflows/backend-windows-live-policy.yml'
|
|
- 'backend/packages/harness/deerflow/workspace_changes/**'
|
|
- 'backend/tests/test_client_live_policy.py'
|
|
- 'backend/tests/test_client_live.py'
|
|
- 'backend/tests/test_scanner_text_cache_atomic.py'
|
|
- 'backend/tests/test_workspace_changes.py'
|
|
- 'backend/pyproject.toml'
|
|
- 'backend/uv.lock'
|
|
|
|
concurrency:
|
|
group: windows-live-policy-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
windows-live-policy:
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
|
|
runs-on: windows-latest
|
|
timeout-minutes: 15
|
|
defaults:
|
|
run:
|
|
working-directory: backend
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
with:
|
|
# Must match backend/Dockerfile's UV_IMAGE tag.
|
|
version: '0.11.1'
|
|
|
|
- name: Install backend dependencies
|
|
run: uv sync --locked --group dev
|
|
|
|
- name: Check isolated child environment, live-test collection policy, and text-cache byte exactness
|
|
# Explicit nodes include all four collection cases and avoid make.
|
|
# The two workspace-changes modules pin byte-exact text-cache
|
|
# round-trips whose regression (newline translation) only fails on
|
|
# native Windows — ubuntu CI cannot catch it (PR #7110 review).
|
|
run: >-
|
|
uv run python -m pytest
|
|
tests/test_client_live_policy.py::test_child_env_stays_isolated_but_bootable_on_windows
|
|
tests/test_client_live_policy.py::test_config_alone_does_not_enable_live_collection
|
|
tests/test_client_live_policy.py::test_explicit_opt_in_collects_live_tests
|
|
tests/test_client_live_policy.py::test_ci_blocks_live_collection_even_with_opt_in
|
|
tests/test_client_live_policy.py::test_opt_in_without_config_reports_missing_config
|
|
tests/test_scanner_text_cache_atomic.py
|
|
tests/test_workspace_changes.py
|
|
-q
|