ci: add cargo test job on ubuntu + macos matrix#30
Merged
rocketman-code merged 1 commit intomainfrom Apr 14, 2026
Merged
Conversation
The 23 unit tests had no CI gate. Local cargo test passes were the only signal; a regression could merge if the maintainer forgot to run tests before pushing. Runs cargo test --release on a matrix of [ubuntu-latest, macos-latest]. The tests are pure logic (parser, format conversion, name validation) with dependency surface bounded only by what the production code compiles for. Production code uses Unix APIs (std::os::unix, libc::localtime_r) so it compiles on Linux + macOS but not Windows; running on both members of that surface verifies the platform- independence we implicitly assert. The existing x86_64 lima Fedora VM job is unchanged. It tests `atomic-rollback check` against a real Fedora 43 environment, which is its own (deeper) dependency surface. The new tests job tests pure logic at the root of the dependency graph.
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.
Summary
testsjob to CI that runscargo test --releaseon a matrix of[ubuntu-latest, macos-latest].cargo testpasses were the only signal; a regression could merge if the maintainer forgot to run tests before pushing.Why this matrix shape
Tests have a dependency surface — the set of things whose change could change the test's output. Tests should run at the minimum specificity that contains their dependency surface. For our 23 tests (parser tests, format conversion, name validation, no fs ops, no syscalls): dependency surface is pure Rust + libc-or-stdlib. They attach at the ROOT of the platform graph.
ROOT is bounded by what production code compiles for. Our code uses Unix APIs (
std::os::unix::fs::symlink,libc::localtime_r) — compiles on Linux + macOS, not Windows. So ROOT = Unix platforms, and the matrix is[ubuntu-latest, macos-latest].Verified empirically that tests pass on macOS (Darwin 25.3.0, rustc 1.93.1, all 23 tests green) before adopting this design.
Why not also Fedora VM
The existing
x86_64lima Fedora VM job runsatomic-rollback checkwhich DOES have Fedora-specific dependencies (specific paths, btrfs tooling, BLS layout). That's a deeper node in the dependency graph and stays where it is. Running unit tests inside the Fedora VM would be over-testing — pure-logic tests don't need a Fedora environment to verify their correctness.Test plan
tests (ubuntu-latest)job passes on this PR (16s)tests (macos-latest)job passes on this PR (27s)x86_64(2m15s) andaarch64-cross(35s) jobs still pass on this PR (no regression)