ci(positron): run Positron API tests on ubuntu-latest - #4346
ci(positron): run Positron API tests on ubuntu-latest#4346jonvanausdeln wants to merge 1 commit into
Conversation
Linux Actions minutes bill at roughly 1/10 the macOS rate (posit-dev/positron#15281). - Switch the Positron-API-Tests runner from macos-latest to ubuntu-latest. - Wrap the test command in `xvfb-run -a`. Positron is an Electron app and needs a display server on Linux; posit-dev/setup-positron is a thin composite step that only runs the command it is handed, so it provides none. Without this the run fails with "Missing X server or $DISPLAY" and then SIGSEGV. - Bump @posit-dev/positron-test-electron to ^0.0.3, which is the first release whose platform table includes linux-x64 (0.0.2 was darwin-arm64/darwin-x64 only). - Pin posit-dev/setup-positron@v1 instead of @main so upstream changes to the action can't break CI here. - Add ${{ runner.os }} to the Positron download cache key (restore and save). The cache layout is .positron-test/<channel>/<version>/<platform>, so without it a stale same-day macOS entry would restore, set cache-hit=true, suppress the save step, and the Linux build would never get cached. - Add workflow_dispatch alongside workflow_call so the suite can be run manually (matches e2e.yaml). - Replace the "macOS only" notes in the launcher script, the suite README, and extensions/vscode/CLAUDE.md with the xvfb-run recipe for headless Linux runs.
|
Claude finished @jonvanausdeln's task in 58s —— View job Code Review Complete
Review SummaryThis is a well-executed PR that moves the Positron API tests from macOS to Ubuntu Linux for significant cost savings. The changes are thorough and address all the platform differences correctly. What looks good
No issues foundThe implementation is clean and complete. The verification run on a fork with visible test output in the logs confirms the tests actually executed. No CHANGELOG entry is correct per the repo guidelines (CI-only, no user-facing change). Verdict: Approve — Ready to merge. |
Moves the
Positron-API-Testsworkflow frommacos-latesttoubuntu-latest. Linux Actions minutes bill at roughly 1/10 the macOS rate.Part of posit-dev/positron#15281. The suite itself landed in #4298.
Changes
Beyond the runner line, four things were required:
xvfb-run -awrap. Positron is an Electron app and needs a display server on Linux.posit-dev/setup-positronis a thin composite step that only runs the command it is handed, so it provides none. Without this the run fails withMissing X server or $DISPLAYand then dies with SIGSEGV.@posit-dev/positron-test-electron→^0.0.3. 0.0.2's platform table isdarwin-arm64/darwin-x64only;linux-x64andwin32-x64descriptors land in 0.0.3 (the latest published version). The bump is inextensions/vscode/package.jsonwith the root workspacepackage-lock.jsonupdated to match.posit-dev/setup-positron@v1instead of@main, so upstream changes to the action can't break CI here.${{ runner.os }}in the Positron download cache key, on both the restore and the save step. The cache layout is.positron-test/<channel>/<version>/<platform>, so under an OS-less key a stale same-day macOS entry would restore, setcache-hit=true, suppress the save step, and the Linux build would never get cached that day.Also:
workflow_dispatchalongsideworkflow_callso the suite can be triggered manually (e2e.yamlalready does both). This is what made the pre-merge verification below possible.scripts/run-positron-tests.mjs,src/test/positron/README.md, andextensions/vscode/CLAUDE.mdwith thexvfb-runrecipe for headless Linux runs. Unrelateddarwinplatform switches in extension source are untouched.Verification
Dispatched on a fork before opening this PR (run, commit
4b9ac8d8). A green job alone doesn't prove the tests ran, so from the log:Both interpreter-discovery tests pass, so
actions/setup-python@v7andr-lib/actions/setup-r@v2resolve on ubuntu and Positron's runtime discovery finds both.positron-channel: stableworks on Linux — the 0.0.3 README's "stable not available on Linux/Windows yet" caveat is stale. Wall clock was ~5 minutes.No CHANGELOG entry: CI-only, no user-facing behavior change.