Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ concurrency:
jobs:
dispatch:
name: Run requested UI tests
if: ${{ github.repository_owner == 'manaflow-ai' }}
# The route/controller lane is disabled while its infra cancellation bug is
# repaired. Re-enable with CI_UI_TESTS_ENABLED=1; await-request also keeps
# non-UI diffs out of the downstream test runner.
if: ${{ github.repository_owner == 'manaflow-ai' && vars.CI_UI_TESTS_ENABLED == '1' }}
runs-on: ubuntu-24.04 # github-hosted-required: holds actions write and mostly waits; keeps CI's Linux pool free
# A request can follow a long compile admission; the dispatch then waits up
# to 50 minutes for the compile it adopts, then runs the tests.
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,10 @@ jobs:
- changes
- static-preflight
- macos-admission-gate
if: ${{ !cancelled() && needs.changes.result == 'success' && needs.static-preflight.result == 'success' && (needs.macos-admission-gate.result == 'success' || needs.macos-admission-gate.result == 'skipped' && needs.changes.outputs.compile_admitted == 'true') && needs.changes.outputs.ui_selectors != '' }}
# The route/controller lane is disabled while its infra cancellation bug is
# repaired. Re-enable with the repository variable CI_UI_TESTS_ENABLED=1;
# selectors still keep dispatches limited to UI-touching diffs.
if: ${{ vars.CI_UI_TESTS_ENABLED == '1' && !cancelled() && needs.changes.result == 'success' && needs.static-preflight.result == 'success' && (needs.macos-admission-gate.result == 'success' || needs.macos-admission-gate.result == 'skipped' && needs.changes.outputs.compile_admitted == 'true') && needs.changes.outputs.ui_selectors != '' }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-4vcpu-ubuntu-2404' || vars.LINUX_RUNNER || 'blacksmith-4vcpu-ubuntu-2404' }}
# A compile wait of up to 50 minutes, then the tests.
timeout-minutes: 150
Expand Down
2 changes: 2 additions & 0 deletions tests/test_ci_ui_tests_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ def test_pull_request_ci_holds_no_write_token(self) -> None:
with self.subTest(job=name):
self.assertNotIn("write", str((job.get("permissions") or {}).get("actions")))
job = document["jobs"]["ui-tests"]
self.assertIn("vars.CI_UI_TESTS_ENABLED == '1'", job["if"])
self.assertEqual(job["permissions"], {"contents": "read", "actions": "read"})
steps = job["steps"]
self.assertEqual(steps[0]["if"], "github.event.pull_request.head.repo.full_name != github.repository")
Expand All @@ -562,6 +563,7 @@ def test_the_dispatching_workflow_runs_from_the_default_branch(self) -> None:
self.assertEqual(set(on["workflow_dispatch"]["inputs"]), {"run_id", "run_attempt"})
self.assertEqual(document["permissions"], {})
job = document["jobs"]["dispatch"]
self.assertIn("vars.CI_UI_TESTS_ENABLED == '1'", job["if"])
self.assertEqual(job["name"], ui.DISPATCH_JOB_NAME)
self.assertEqual(job["permissions"]["actions"], "write")
steps = job["steps"]
Expand Down
Loading