Skip to content

ci(checks): run the test suite on Linux and Windows - #234

Merged
mike1858 merged 2 commits into
Piebald-AI:mainfrom
NickAme03:item14/test-job
Aug 20, 2026
Merged

ci(checks): run the test suite on Linux and Windows#234
mike1858 merged 2 commits into
Piebald-AI:mainfrom
NickAme03:item14/test-job

Conversation

@NickAme03

@NickAme03 NickAme03 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Closes #231.

Adds a test job to checks.yml, in the matrix version you preferred rather than the Linux-only one.

fail-fast: false is deliberate: without it a failure on one OS cancels the other, and telling platform-specific failures apart is the whole point of running both.

test is also added to the needs list of all-checks. Without that the job would run and report, but a failure would not block a merge, which is the state the issue describes.

Verified on my fork before opening this, since the push trigger here only covers main. Both platforms green, and all-checks picks up the new dependency: run 30719515514.

job result
Test (ubuntu-latest) success
Test (windows-latest) success
all-checks success

The Windows row is the one worth checking: the suite passes there today, so this job goes in green rather than red.

Summary by CodeRabbit

  • Tests
    • Added automated Cargo test runs on Ubuntu and Windows using the nightly Rust toolchain.
    • Checks now wait for the cross-platform test job to complete.

`checks.yml` runs clippy, fmt, license checks and cargo audit, but never
`cargo test`, while `release.yml` compiles, signs and ships a Windows binary.
A test that only fails on Windows can therefore reach a release unnoticed,
which is what Piebald-AI#226 turned out to be.

The new `test` job uses the matrix rather than the Linux-only version, per
the preference stated in Piebald-AI#231. `fail-fast: false` matters here: without it a
failure on one OS cancels the other, and telling platform-specific failures
apart is the whole point of the job.

`test` is added to the `needs` list of `all-checks`. Without that the job
would run and report, but a failure would not block the merge.
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Approval pending

CodeRabbit has no unresolved comments, but it has not reviewed the latest commit.

Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The checks workflow adds a matrix test job for Ubuntu and Windows. The job installs nightly Rust with Cranelift and runs cargo test --locked. The all-checks job now waits for the test job.

Changes

CI testing

Layer / File(s) Summary
Cross-platform test job
.github/workflows/checks.yml
Adds Ubuntu and Windows test runners with independent failures, nightly Rust, Cranelift, and locked Cargo tests. The aggregate job now depends on the test job.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit checks the build with care,
On Windows roads and Ubuntu air.
Nightly tools hop into place,
Cranelift runs the testing race.
Locked tests finish, green and bright.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the added Linux and Windows test-suite execution.
Linked Issues check ✅ Passed The PR adds locked Cargo tests on Ubuntu and Windows and makes test success required by all-checks, satisfying issue #231.
Out of Scope Changes check ✅ Passed The changes are limited to adding the required cross-platform test job and its all-checks dependency.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]
coderabbitai Bot previously requested changes Aug 1, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/checks.yml:
- Around line 63-65: Restrict the test job permissions by adding a job-level
permissions block under the test job, granting only contents: read for checkout
and leaving all other permissions unavailable.
- Around line 74-75: Update the tests job’s actions/checkout@v4 step to set
persist-credentials to false, ensuring checkout credentials are not retained for
subsequent repository-controlled commands.
- Around line 76-82: Update the workflow’s Rust test configuration around the
“Install Rust toolchain” and “Run tests” steps to opt Cargo into the installed
rustc-codegen-cranelift-preview backend and configure the test profile to use
Cranelift. Ensure cargo test --locked explicitly runs with Cranelift rather than
falling back to LLVM.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8324778c-08c0-4a37-9567-4020957cd06a

📥 Commits

Reviewing files that changed from the base of the PR and between 33377f9 and 0d57082.

📒 Files selected for processing (1)
  • .github/workflows/checks.yml

Comment thread .github/workflows/checks.yml
Comment thread .github/workflows/checks.yml
Comment thread .github/workflows/checks.yml
@NickAme03

Copy link
Copy Markdown
Contributor Author

CodeRabbit flagged three things, and all three apply to the jobs already on main rather than to this one.

The missing job-level permissions and the default persist-credentials on actions/checkout@v4: none of the four existing jobs set either. The test job here does what crate_metadata, lint, license_checks and cargo-audit already do.

The Cranelift point is correct on the facts. cargo test --locked will not pick up rustc-codegen-cranelift-preview without the profile setting and the -Zcodegen-backend opt-in, and .cargo/config.toml only sets the Windows linker. But lint and cargo-audit install the same component and run under LLVM for the same reason, so it is not something this job introduces.

I have left all three alone. Fixing them only in the job I am adding would make it the one job that differs from its neighbours, which seems worse than leaving them consistent. I can open a separate PR covering all of them together if you want that.

@mike1858

mike1858 commented Aug 2, 2026

Copy link
Copy Markdown
Member

@NickAme03 I'll just fix them in a seperate PR, you don't need to. Merging.

@mike1858
mike1858 dismissed coderabbitai[bot]’s stale review August 2, 2026 00:56

I'll fix them in a seperate PR.

@NickAme03

Copy link
Copy Markdown
Contributor Author

Merged current main (d269ecd) into the branch.

The 08-02 run was red on one test, not on the job. tui::tests::model_filter_recalculates_stats_and_sessions asserted day.conversations == 1 while the code returned 2, on both platforms: 414 passed, 1 failed, the same test each time. cdcc5d6 (#236, 08-13) changed that assertion to 2, so the branch was red against a state main has since left.

Green on my fork on the same tree (18f8057), both platforms, 426 passed and 0 failed: https://github.com/NickAme03/splitrail/actions/runs/32104784072

job result
Test (ubuntu-latest) success
Test (windows-latest) success
all-checks success

I ran it there because the run here is sitting on action_required until you approve it.

The diff is unchanged: the same 22 lines adding the test job. checks.yml has not moved since 2025-11-24, so the merge touched nothing but the base.

#231 still describes main as it is. The jobs on checks.yml today are crate_metadata, lint, license_checks, cargo-audit and all-checks. None of them runs the suite.

@mike1858
mike1858 merged commit 94bd339 into Piebald-AI:main Aug 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

checks.yml never runs cargo test, while release.yml ships a signed Windows binary

2 participants