fix(ci): run the os_sensitive packages on the macOS runner, as on the Windows one

Packages whose tests depend on the OS are in the class os_sensitive of
tools/test-partition.json, and a test of one can only pass on the host whose
behaviour it checks. windows-native-test runs them on Windows because the
Linux run cannot stand in for it. macos-hosted did not: macos-nextest builds
with -p of the macOS packages, so komorebic-core, whose docs_cli test
compares docs/macos/cli with what the macOS command line renders, ran on
no Mac in CI, and relied on the Linux run until the wording of Class
differed per platform (run 42311003287).

macos-hosted now runs `cargo nextest run` of the os_sensitive packages in the
native dev shell (92 tests; they pass on a Mac, checked locally). The cost is
macOS minutes on a public repository, which are free, and a compile of four
crates and their dependencies, a few minutes without a cache. docs/dev/ci.md
says so.
This commit is contained in:
LGUG2Z committed 2026-11-06 16:07:50 -08:00
1 parent 24bdab8c2a
commit 5df5c5c3c5
2 files changed
+12 -3

No files matched your search

+8
View File
@@ -37,6 +37,14 @@ jobs:
run: |
# shellcheck disable=SC2016
nix develop .#native --command bash -c 'cargo nextest run --locked -p komorebi-recorder -E "$(tools/test-partition expr recorder-macos)"'
# the packages whose tests depend on the OS (tools/test-partition.json, class os_sensitive: the wording
# of the identifiers, the schemas, the pages of the cli) run on each platform they describe, as
# windows-native-test does on Windows: the checked-in pages of docs/macos/cli are what only a macOS
# host renders. macos-nextest above runs the macOS packages only
- name: The OS-sensitive tests
run: |
# shellcheck disable=SC2016
nix develop .#native --command bash -c 'cargo nextest run --locked $(tools/test-partition packages os_sensitive)'
- name: The binaries
run: |
nix build -L --no-link --print-out-paths .#komorebi .#komorebic .#komorebi-bar |
+4 -3
View File
@@ -27,7 +27,7 @@ each is `success` or `skipped`: it is the only check a ruleset needs to require.
| 3 | `test` (4 legs) | ubuntu-24.04, nix | `checkSets.{linux-test,windows-test,recorder-test,nixgen-test}`: Linux tests, the Windows test executables cross-built (not run), the recorder's and nixgen's tests | always |
| 3 | `windows-native-test` | windows-latest | `cargo nextest` of the `windows` and `os_sensitive` classes of `tools/test-partition` | Windows or shared paths |
| 3 | `windows-native-test-arm` | windows-11-arm | the same on ARM | label `ci:win-arm`; a push to master with Windows paths; by hand |
| 3 | `macos-hosted` | macos-latest (`_macos.yaml`) | the macOS checks, the recorder's macOS tests (in `nix develop .#native`: the default shell builds for Windows), the binaries, the schemas | macOS paths |
| 3 | `macos-hosted` | macos-latest (`_macos.yaml`) | the macOS checks, the recorder's macOS tests and the `os_sensitive` packages of `tools/test-partition` (both in `nix develop .#native`: the default shell builds for Windows), the binaries, the schemas | macOS paths |
| 4 | `discover`, `vm-fast` | ubuntu-24.04, KVM | the fast tier of the KDE VM suites, one machine each (`max-parallel: 8`, 45 minutes), a machine with no KVM drawn again (`_vm.yaml`, see KVM) | Linux paths; label `ci:vm`; every push to master |
Beside the ladder:
@@ -69,7 +69,7 @@ installs nextest on the Windows runners, which have no nix, and `windows.yaml` (
|---|---|---|---|
| format | `fmt`, `checkSets.fmt` | the same | the same |
| clippy | `lint` (cross build) | `lint` | `macos-hosted` only (`macos-lint`); `mac-typecheck` type-checks on Linux |
| unit tests | `windows-native-test` on Windows, and `windows.yaml` on every event | `test` (`linux-test`) | `macos-hosted` only |
| unit tests | `windows-native-test` on Windows, and `windows.yaml` on every event | `test` (`linux-test`) | `macos-hosted` only (the macOS packages, and the `os_sensitive` ones natively) |
| integration | none (the guest is experimental: `windows-guest.yaml`) | `vm-fast`, `vm-slow` | none in CI; by hand on a Mac: `nix run .#e2e-macos` (a Tart guest, `e2e/platforms/tart_macos`) |
| options and schemas | `linux-options`, `macos-options` on Linux; the Windows schemas are checked by the Windows e2e Python | `linux-options` | `macos-options` on Linux; the schemas by `macos-hosted` |
@@ -97,7 +97,8 @@ workflows do not publish anything, use no `write-all`, and use their own concurr
- The partition makes `windows-native-test` run fewer tests than `windows.yaml` (`just test-windows-full` and `windows-nextest-full` run all of them by hand). When
it has been green for a while, the test step of `windows.yaml` can be removed by the owner of that file.
- The partition (`tools/test-partition.json`) puts `komorebi-windows` in the class `windows` and `komorebi-config`, `-protocol`, `-transport` and `komorebic-core` in `os_sensitive`:
those are what `windows-native-test` runs. `komorebi-client`, `komorebi-bar` and `komorebi-recorder` are `mixed`, so a platform job names them with `-p`. The nix set `windows-test` builds the
those are what `windows-native-test` runs, and what `macos-hosted` runs on macOS: a test that renders text worded per platform (`docs_cli` of `komorebic-core` checks the pages of `docs/macos/cli`, and
skips on every host but a Mac) can only pass on the host whose wording it checks, so it is not covered by the `linux-test` run of the same package. `komorebi-client`, `komorebi-bar` and `komorebi-recorder` are `mixed`, so a platform job names them with `-p`. The nix set `windows-test` builds the
same subset; the whole suite is the set `windows-test-full` (not in the default sets, so not in `ci`) and `just test-windows-full`.
- Both run `cargo-deny`; `ci / deny` is the cheaper copy and stops the ladder first.
- `actionlint` in `hygiene` leaves `windows.yaml` out: it reads the PowerShell of that file as bash. `just lint` runs it on every workflow and fails on that file.