From 82fead9064aa72c4369b9aceb107937bc0a2dd0c Mon Sep 17 00:00:00 2001 From: wenytang-ms Date: Wed, 20 May 2026 09:44:56 +0800 Subject: [PATCH 1/2] ci(e2e-autotest): add Linux to the runner matrix The e2e-test job was hard-coded to `runs-on: windows-latest` even though the autotest framework and the platformMap in this workflow were already written to be OS-aware. This change wires the matrix axis through so we exercise every plan on both Windows and Linux on every PR / schedule run. Changes: * matrix.os = [windows-latest, ubuntu-latest]; runs-on uses it * JDK 25 step is now cross-platform pwsh (junction on Windows, symlink to /opt/jdk-25 on Linux, plus an in-place rewrite of the Windows-style java.jdt.ls.java.home in the java25 plan) * New `Setup virtual display (Linux)` step installs xvfb and exports DISPLAY=:99 before the autotest CLI launches VS Code (the autotest framework does not spawn Xvfb itself) * Artifact name suffix: results-- so Windows and Linux results don't collide * analyze.organize-results: preserve the - suffix so the aggregate report keeps Windows and Linux runs distinct Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/e2e-autotest.yml | 40 +++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index 82e08d9c..848b3dc5 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -88,11 +88,12 @@ jobs: needs: [discover, build-pack] # build-pack is skipped on schedule/workflow_dispatch — only require it on PRs if: ${{ always() && needs.discover.result == 'success' && (github.event_name != 'pull_request' || needs.build-pack.result == 'success') }} - runs-on: windows-latest + runs-on: ${{ matrix.os }} timeout-minutes: 30 strategy: fail-fast: false matrix: + os: [windows-latest, ubuntu-latest] plan: ${{ fromJson(needs.discover.outputs.matrix) }} steps: @@ -117,11 +118,24 @@ jobs: distribution: temurin java-version: 25-ea - - name: Create JDK 25 path + - name: Configure JDK 25 path for runner OS if: contains(matrix.plan, 'java25') shell: pwsh run: | - New-Item -ItemType Junction -Path "C:\Program Files\Java\jdk-25" -Target $env:JAVA_HOME + $planFile = "test-plans/${{ matrix.plan }}.yaml" + if ($IsWindows) { + $target = "C:\Program Files\Java\jdk-25" + New-Item -ItemType Junction -Path $target -Target $env:JAVA_HOME -Force | Out-Null + Write-Host "Created junction: $target -> $env:JAVA_HOME" + } else { + $target = "/opt/jdk-25" + sudo ln -sfn $env:JAVA_HOME $target + Write-Host "Created symlink: $target -> $env:JAVA_HOME" + # Linux: rewrite the Windows-style java.home setting in the plan + # so the language server resolves JDK 25 on this runner. + (Get-Content $planFile -Raw) -replace 'C:\\\\Program Files\\\\Java\\\\jdk-25', $target | Set-Content $planFile + Write-Host "Patched $planFile java.jdt.ls.java.home -> $target" + } - name: Setup Java 21 uses: actions/setup-java@v4 @@ -132,6 +146,17 @@ jobs: - name: Install autotest CLI run: npm install -g @vscjava/vscode-autotest + - name: Setup virtual display (Linux) + if: runner.os == 'Linux' + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y xvfb + Xvfb :99 -screen 0 1920x1080x24 & + echo "DISPLAY=:99" >> "$GITHUB_ENV" + # Give Xvfb a moment to start before the autotest CLI launches VS Code. + sleep 2 + - name: Download PR VSIX (vscode-java-pack from branch) if: ${{ github.event_name == 'pull_request' }} uses: actions/download-artifact@v4 @@ -217,7 +242,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: results-${{ matrix.plan }} + name: results-${{ matrix.plan }}-${{ matrix.os }} path: test-results/ retention-days: 30 @@ -246,10 +271,13 @@ jobs: - name: Organize results run: | mkdir -p test-results + # Each artifact is named results--; keep that suffix so + # Windows and Linux runs of the same plan don't collide. for dir in all-results/results-*/; do + artifact=$(basename "$dir") # results-- + suffix="${artifact#results-}" # - find "$dir" -name "results.json" -exec dirname {} \; | while read d; do - name=$(basename "$d") - cp -r "$d" "test-results/$name" + cp -r "$d" "test-results/$suffix" done done echo "Organized results:" From c1108358def573827bf4f61036010405f0a4399b Mon Sep 17 00:00:00 2001 From: wenytang-ms Date: Wed, 20 May 2026 09:53:02 +0800 Subject: [PATCH 2/2] ci(e2e-autotest): also include macOS in the runner matrix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds `macos-latest` to the matrix.os list. The cross-platform pwsh branch added in the previous commit already covers macOS: * `\True` is false on macOS so the symlink path runs unchanged * macOS supports `sudo ln -sfn` to /opt/jdk-25 (added `mkdir -p /opt` so the path exists before the link is created) * macOS GitHub-hosted runners have a real display, so no xvfb step is needed (the xvfb step stays gated on runner.os == 'Linux') * PowerShell Core is preinstalled on macos-latest runners * @vscode/test-electron downloads the darwin VSIX automatically Run count grows from 17 plans × 2 OSes to 17 × 3. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/e2e-autotest.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-autotest.yml b/.github/workflows/e2e-autotest.yml index 848b3dc5..db4d2998 100644 --- a/.github/workflows/e2e-autotest.yml +++ b/.github/workflows/e2e-autotest.yml @@ -93,7 +93,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest] + os: [windows-latest, ubuntu-latest, macos-latest] plan: ${{ fromJson(needs.discover.outputs.matrix) }} steps: @@ -128,11 +128,13 @@ jobs: New-Item -ItemType Junction -Path $target -Target $env:JAVA_HOME -Force | Out-Null Write-Host "Created junction: $target -> $env:JAVA_HOME" } else { + # Linux and macOS: symlink JAVA_HOME to a known location and + # rewrite the Windows-style java.jdt.ls.java.home in the plan + # so the language server resolves JDK 25 on this runner. $target = "/opt/jdk-25" + sudo mkdir -p /opt sudo ln -sfn $env:JAVA_HOME $target Write-Host "Created symlink: $target -> $env:JAVA_HOME" - # Linux: rewrite the Windows-style java.home setting in the plan - # so the language server resolves JDK 25 on this runner. (Get-Content $planFile -Raw) -replace 'C:\\\\Program Files\\\\Java\\\\jdk-25', $target | Set-Content $planFile Write-Host "Patched $planFile java.jdt.ls.java.home -> $target" }