Repository navigation
Run the desktop app's Rust tests in CI on Linux, macOS, and Windows - #204
Merged
Merged
Conversation
Add a rust_tests job that runs cargo test for src-tauri on Linux, macOS, and Windows, with cached cargo builds, and require it in CI passed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Windows has no executable bit, so any file is executable there and the Linux case in rejects_paths_that_cannot_be_launched failed on Windows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
vycdev
force-pushed
the
ci/cargo-test
branch
from
November 19, 2026 20:52
a74945c to
4a89e21
Compare
This was referenced Nov 19, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The v4.3.0 release review found that no workflow ran the desktop app's Rust tests.
src-taurihas 30 unit tests, including the ones for Open in Slicer and #176, but CI and the release workflow only built the app. Now every pull request intodevelopormain, and every push to them, runscargo test, andCI passedrequires it.Why Linux, macOS, and Windows. Each OS compiles different native code and runs a different set of tests. The default-app launcher uses GIO on Linux, Launch Services on macOS, and
ShellExecuteExon Windows. Three launcher tests exist only on macOS, and some slicer tests run only on Unix. An Ubuntu-only job would never compile the Windows code or run the macOS tests. The repo is public, so macOS and Windows runners cost nothing. The jobs run alongside the e2e suites, which already take longer, so the matrix adds no wait. The Windows leg found a real problem on its first run:rejects_paths_that_cannot_be_launchedassumed a Unix host. Windows has no executable bit, so a plain.txtfile counted as a Linux executable there. Shipped behavior is unaffected, because the platform is fixed to the host OS. That one case now runs only on Unix, like the other Unix-only checks in the file.Details
ubuntu-22.04with the same packages asrelease.yml.ubuntu-latestis now 26.04, which lackslibwebkit2gtk-4.0-dev.Swatinem/rust-cachecaches the cargo registry andsrc-tauri/target. Pull request runs only restore it, so they don't fill the repo's cache quota.cargo test --locked. No frontend build is needed, because debug builds usedevUrl.permissions: contents: read,persist-credentials: false, and thepull_requestfork-safety note are unchanged.test:e2e:all" changelog bullet now covers this job.Proof:
cargo test --lockedpassed locally on macOS (30 tests), and actionlint andcargo fmt --checkare clean. Twoworkflow_dispatchruns on this branch: the first passed Linux and macOS and failed on Windows with the test above. The second, with the fix, passed all three (Linux 27, macOS 30, Windows 26 tests), and the cargo cache cut compile time from about 1m40s to 14s on Linux. The e2e jobs in those dispatch runs failed for an unrelated reason. Runs on a feature branch can't restore develop's Chromium cache, and Playwright can't install Chromium on Ubuntu 26.04.Reviewed with sol-loop: 2 rounds with gpt-6.2-sol. Sol verdict: approved
Council review
Rounds: 2
Fixed: a test comment that overstated what a plain file passes when not on Unix. Declined, with both members' agreement: limiting the cargo cache's share of the repo cache quota (not needed now); making
CI passedcatch a matrix leg cancelled before it gets a runner (the e2e matrix has the same gap, so a fix belongs in a workflow-wide change); and dropping the extra Linux packages (the list is copied fromrelease.ymlas requested).Created with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code