perf(ci): shorten WebUI feedback latency
Run WebUI checks/build and browser regressions on independent runners while preserving the existing webui aggregate check and every acceptance command. Advance the existing invalid-input validation windows with scoped fake timers instead of real sleeps.
This commit is contained in:
1 parent
11152626f8
commit
f869212e7d
2 files changed
+44
-6
No files matched your search
@@ -278,7 +278,8 @@ jobs:
|
||||
tests/cli/test_wsl_browser.py
|
||||
--durations=25 --durations-min=1.0
|
||||
|
||||
webui:
|
||||
webui_checks:
|
||||
name: WebUI checks and build
|
||||
needs: changes
|
||||
if: needs.changes.outputs.webui_required == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
@@ -316,6 +317,29 @@ jobs:
|
||||
working-directory: webui
|
||||
run: bun run test:coverage
|
||||
|
||||
- name: Build WebUI
|
||||
working-directory: webui
|
||||
run: bun run build
|
||||
|
||||
webui_browser:
|
||||
name: WebUI browser
|
||||
needs: changes
|
||||
if: needs.changes.outputs.webui_required == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: 1.3.6
|
||||
|
||||
- name: Install WebUI dependencies
|
||||
working-directory: webui
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Install browser for layout regressions
|
||||
working-directory: webui
|
||||
run: bun x playwright install --with-deps chromium
|
||||
@@ -324,9 +348,19 @@ jobs:
|
||||
working-directory: webui
|
||||
run: bun run test:browser
|
||||
|
||||
- name: Build WebUI
|
||||
working-directory: webui
|
||||
run: bun run build
|
||||
webui:
|
||||
needs: [changes, webui_checks, webui_browser]
|
||||
if: always() && needs.changes.outputs.webui_required == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 1
|
||||
|
||||
steps:
|
||||
# Keep the existing check name dependent on every WebUI acceptance check.
|
||||
- name: Require both WebUI jobs to pass
|
||||
env:
|
||||
CHECKS_RESULT: ${{ needs.webui_checks.result }}
|
||||
BROWSER_RESULT: ${{ needs.webui_browser.result }}
|
||||
run: test "$CHECKS_RESULT" = success && test "$BROWSER_RESULT" = success
|
||||
|
||||
tui:
|
||||
needs: changes
|
||||
|
||||
@@ -666,10 +666,12 @@ describe("Settings models", () => {
|
||||
await togglePresetEditor();
|
||||
fireEvent.click(screen.getByRole("button", { name: /Advanced options/ }));
|
||||
const input = screen.getByRole("textbox", { name: "Context window" });
|
||||
vi.useFakeTimers();
|
||||
fireEvent.change(input, { target: { value } });
|
||||
expect(input).toHaveAttribute("aria-invalid", "true");
|
||||
expect(input).toHaveAccessibleDescription("Enter a positive token count, such as 200k, 1m, or 131072.");
|
||||
await new Promise((resolve) => setTimeout(resolve, 750));
|
||||
await act(() => vi.advanceTimersByTimeAsync(750));
|
||||
vi.useRealTimers();
|
||||
expect(requestMutationMock).not.toHaveBeenCalled();
|
||||
expect(input).toHaveValue(value);
|
||||
returnToPresetEditor();
|
||||
@@ -700,10 +702,12 @@ describe("Settings models", () => {
|
||||
input = screen.getByRole("textbox", { name: "Max output tokens" });
|
||||
expect(input).toHaveValue("32k");
|
||||
requestMutationMock.mockClear();
|
||||
vi.useFakeTimers();
|
||||
fireEvent.change(input, { target: { value: "" } });
|
||||
expect(input).toHaveAttribute("aria-invalid", "true");
|
||||
expect(presetSaveButton()).toBeDisabled();
|
||||
await new Promise((resolve) => setTimeout(resolve, 750));
|
||||
await act(() => vi.advanceTimersByTimeAsync(750));
|
||||
vi.useRealTimers();
|
||||
expect(requestMutationMock).not.toHaveBeenCalled();
|
||||
fireEvent.change(input, { target: { value: "8.192k" } });
|
||||
returnToPresetEditor();
|
||||
|
||||
Reference in new issue
Block a user