Skip to content

Commit 0e3fa5e

Browse files
committed
Add a virtual display for the web render-matrix job's headed Chrome
Verified against a real run on GitHub's ubuntu-latest: flutter drive -d chrome launches Chrome headed regardless (flutter/flutter#95085 — its own headless plumbing for drive doesn't reliably take effect), so it failed with "Missing X server or $DISPLAY" and never reached the test. Wrap the drive invocation in xvfb-run so Chrome has a virtual display to open a window against.
1 parent 9758eb1 commit 0e3fa5e

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,23 @@ jobs:
107107
working-directory: example
108108
run: flutter pub get
109109

110+
# `flutter drive -d chrome` launches a headed Chrome (its own
111+
# --web-run-headless plumbing is unreliable — flutter/flutter#95085),
112+
# so it needs a display to open a window against even though nothing
113+
# is ever shown. Xvfb provides a virtual one.
114+
- name: Install Xvfb
115+
run: |
116+
sudo apt-get update
117+
sudo apt-get install -y xvfb
118+
110119
# CanvasKit is what the render matrix runs here. This is the one leg of
111120
# the platform matrix that needs no emulator or macOS/iOS runner, so it
112121
# is the standing gate; the rest of the matrix is deliberately not
113122
# wired into CI — see the comments below for why each is missing.
114123
- name: Run the variable stroke render matrix on Chrome (CanvasKit)
115124
working-directory: example
116125
run: |
117-
flutter drive \
126+
xvfb-run --auto-servernum flutter drive \
118127
--driver=test_driver/integration_test.dart \
119128
--target=integration_test/variable_stroke_test.dart \
120129
-d chrome

0 commit comments

Comments
 (0)