66 pull_request :
77 branches : [ main ]
88
9- # Unified parallel E2E UI pipeline for Linux + Windows .
9+ # Split-pipeline E2E UI workflow .
1010#
1111# lint → tslint + checkstyle (ubuntu, OS-agnostic)
1212# discover-plans → emits a matrix of test-plan basenames
13- # build (matrix) → produces one VSIX per OS, uploaded as artifact
14- # e2e (matrix) → cartesian product of {os × plan}, all running in parallel
15- # analyze → aggregates results from BOTH OSes into one unified summary
1613#
17- # Modelled after vscode-java-pack/.github/workflows/e2e-autotest.yml; matrix
18- # has been extended with an `os` dimension so a single `e2e` job covers both
19- # platforms. Each matrix cell surfaces as its own PR check, so failures are
20- # visible without an extra gate job.
14+ # build-linux ─┐
15+ # e2e-linux (×plan) ┤
16+ # ├──→ analyze → unified summary covering both OSes
17+ # build-windows ─┤
18+ # e2e-windows (×plan)┘
19+ #
20+ # Per-OS pipelines run completely independently: Linux e2e jobs do NOT
21+ # wait for the Windows VSIX build (and vice versa), so a slow Windows
22+ # build cannot delay the start of Linux e2e plans. Each matrix cell
23+ # surfaces as its own PR check, so failures are visible without an
24+ # extra gate job.
25+ #
26+ # Inspired by vscode-java-pack/.github/workflows/e2e-autotest.yml.
2127
2228jobs :
2329 # ── Lint + Checkstyle (OS-agnostic) ─────────────────────
@@ -66,15 +72,11 @@ jobs:
6672 echo "matrix=$plans" >> "$GITHUB_OUTPUT"
6773 echo "Found plans: $plans"
6874
69- # ── Build VSIX (one per OS) ─────────────────────────────
70- build :
71- name : Build VSIX (${{ matrix.os }} )
72- runs-on : ${{ matrix.os }}
75+ # ── Build VSIX (Linux) ───── ─────────────────────────────
76+ build-linux :
77+ name : Build VSIX (Linux )
78+ runs-on : ubuntu-latest
7379 timeout-minutes : 20
74- strategy :
75- fail-fast : false
76- matrix :
77- os : [ ubuntu-latest, windows-latest ]
7880 steps :
7981 - uses : actions/checkout@v4
8082
@@ -104,27 +106,63 @@ jobs:
104106 - name : Upload VSIX artifact
105107 uses : actions/upload-artifact@v4
106108 with :
107- name : vsix-${{ matrix.os }}
109+ name : vsix-linux
108110 path : vscode-java-dependency.vsix
109111 retention-days : 1
110112
111- # ── Run every (OS × plan) combo in parallel ─────────────
112- e2e :
113- name : E2E (${{ matrix.os }} / ${{ matrix.plan }})
114- needs : [ build, discover-plans ]
115- runs-on : ${{ matrix.os }}
113+ # ── Build VSIX (Windows) ────────────────────────────────
114+ build-windows :
115+ name : Build VSIX (Windows)
116+ runs-on : windows-latest
117+ timeout-minutes : 20
118+ steps :
119+ - uses : actions/checkout@v4
120+
121+ - name : Set up JDK 21
122+ uses : actions/setup-java@v4
123+ with :
124+ java-version : ' 21'
125+ distribution : ' temurin'
126+
127+ - name : Setup Node.js environment
128+ uses : actions/setup-node@v4
129+ with :
130+ node-version : 20
131+
132+ - name : Install Node.js modules
133+ run : npm install
134+
135+ - name : Install VSCE
136+ run : npm install -g @vscode/vsce
137+
138+ - name : Build OSGi bundle
139+ run : npm run build-server
140+
141+ - name : Build VSIX file
142+ run : vsce package -o vscode-java-dependency.vsix
143+
144+ - name : Upload VSIX artifact
145+ uses : actions/upload-artifact@v4
146+ with :
147+ name : vsix-windows
148+ path : vscode-java-dependency.vsix
149+ retention-days : 1
150+
151+ # ── E2E plans (Linux) — depends only on Linux build ─────
152+ e2e-linux :
153+ name : E2E Linux (${{ matrix.plan }})
154+ needs : [ build-linux, discover-plans ]
155+ runs-on : ubuntu-latest
116156 timeout-minutes : 25
117157 strategy :
118158 fail-fast : false
119159 matrix :
120- os : [ ubuntu-latest, windows-latest ]
121160 plan : ${{ fromJson(needs.discover-plans.outputs.matrix) }}
122161
123162 steps :
124163 - uses : actions/checkout@v4
125164
126- - name : Setup Linux Build Environment (Xvfb)
127- if : runner.os == 'Linux'
165+ - name : Setup Build Environment (Xvfb)
128166 run : |
129167 sudo apt-get update
130168 sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
@@ -151,11 +189,10 @@ jobs:
151189 - name : Download VSIX artifact
152190 uses : actions/download-artifact@v4
153191 with :
154- name : vsix-${{ matrix.os }}
192+ name : vsix-linux
155193 path : .
156194
157- - name : E2E Test — ${{ matrix.plan }} (Linux)
158- if : runner.os == 'Linux'
195+ - name : E2E Test — ${{ matrix.plan }}
159196 shell : bash
160197 env :
161198 AZURE_OPENAI_ENDPOINT : ${{ secrets.AZURE_OPENAI_ENDPOINT }}
@@ -166,8 +203,49 @@ jobs:
166203 --vsix "$(pwd)/vscode-java-dependency.vsix" \
167204 --output "test-results/${{ matrix.plan }}"
168205
169- - name : E2E Test — ${{ matrix.plan }} (Windows)
170- if : runner.os == 'Windows'
206+ - name : Upload test results
207+ if : ${{ always() }}
208+ uses : actions/upload-artifact@v4
209+ with :
210+ name : e2e-results-linux-${{ matrix.plan }}
211+ path : test-results/
212+ retention-days : 7
213+
214+ # ── E2E plans (Windows) — depends only on Windows build ─
215+ e2e-windows :
216+ name : E2E Windows (${{ matrix.plan }})
217+ needs : [ build-windows, discover-plans ]
218+ runs-on : windows-latest
219+ timeout-minutes : 25
220+ strategy :
221+ fail-fast : false
222+ matrix :
223+ plan : ${{ fromJson(needs.discover-plans.outputs.matrix) }}
224+
225+ steps :
226+ - uses : actions/checkout@v4
227+
228+ - name : Set up JDK 21
229+ uses : actions/setup-java@v4
230+ with :
231+ java-version : ' 21'
232+ distribution : ' temurin'
233+
234+ - name : Setup Node.js environment
235+ uses : actions/setup-node@v4
236+ with :
237+ node-version : 20
238+
239+ - name : Setup autotest
240+ run : npm install -g @vscjava/vscode-autotest
241+
242+ - name : Download VSIX artifact
243+ uses : actions/download-artifact@v4
244+ with :
245+ name : vsix-windows
246+ path : .
247+
248+ - name : E2E Test — ${{ matrix.plan }}
171249 shell : pwsh
172250 env :
173251 AZURE_OPENAI_ENDPOINT : ${{ secrets.AZURE_OPENAI_ENDPOINT }}
@@ -180,14 +258,14 @@ jobs:
180258 if : ${{ always() }}
181259 uses : actions/upload-artifact@v4
182260 with :
183- name : e2e-results-${{ matrix.os }} -${{ matrix.plan }}
261+ name : e2e-results-windows -${{ matrix.plan }}
184262 path : test-results/
185263 retention-days : 7
186264
187265 # ── Unified analysis across both OSes ───────────────────
188266 analyze :
189267 name : E2E Summary
190- needs : e2e
268+ needs : [ e2e-linux, e2e-windows ]
191269 if : ${{ always() }}
192270 runs-on : ubuntu-latest
193271 steps :
@@ -210,17 +288,15 @@ jobs:
210288 shell : bash
211289 run : |
212290 mkdir -p test-results
213- # Artifact dir names look like: e2e-results-ubuntu-latest-<plan>
214- # or e2e-results-windows-latest-<plan>
215- for dir in all-results/e2e-results-ubuntu-latest-*/; do
291+ for dir in all-results/e2e-results-linux-*/; do
216292 [ -d "$dir" ] || continue
217293 find "$dir" -name "results.json" -exec dirname {} \; | while read d; do
218294 name=$(basename "$d")
219295 mkdir -p "test-results/linux-$name"
220296 cp -r "$d"/. "test-results/linux-$name"/
221297 done
222298 done
223- for dir in all-results/e2e-results-windows-latest- */; do
299+ for dir in all-results/e2e-results-windows-*/; do
224300 [ -d "$dir" ] || continue
225301 find "$dir" -name "results.json" -exec dirname {} \; | while read d; do
226302 name=$(basename "$d")
0 commit comments