diff --git a/.github/workflows/drift-check.yml b/.github/workflows/drift-check.yml index 88b2962..2018bf1 100644 --- a/.github/workflows/drift-check.yml +++ b/.github/workflows/drift-check.yml @@ -6,6 +6,12 @@ on: schedule: - cron: "0 6 * * *" workflow_dispatch: + inputs: + preflight_only: + description: "Build and upload the trusted preflight artifact without running drift review" + required: false + type: boolean + default: false permissions: contents: read @@ -193,7 +199,9 @@ jobs: if-no-files-found: error drift: - if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + if: >- + github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + && (github.event_name != 'workflow_dispatch' || inputs.preflight_only != true) needs: preflight_backtests permissions: contents: read diff --git a/tests/test_drift_workflow_config.py b/tests/test_drift_workflow_config.py index 90984bb..31ccad7 100644 --- a/tests/test_drift_workflow_config.py +++ b/tests/test_drift_workflow_config.py @@ -4,6 +4,10 @@ def test_drift_workflow_wires_real_pipeline_inputs_and_preflight_bundle() -> None: workflow = (Path(__file__).resolve().parents[1] / ".github" / "workflows" / "drift-check.yml").read_text(encoding="utf-8") + assert "preflight_only:" in workflow + assert "type: boolean" in workflow + assert "default: false" in workflow + assert "inputs.preflight_only != true" in workflow assert "preflight_backtests:" in workflow assert "needs: preflight_backtests" in workflow assert "snapshot_repository_ref: ${{ steps.snapshot-input.outputs.snapshot_repository_ref }}" in workflow