Skip to content

Add a macos-latest job to the CI matrix #6

Description

@darkone-linux

Summary

All three CI jobs run on ubuntu-latest (.github/workflows/ci.yml), so every
platform-conditional branch in the codebase ships untested:

macos-latest closes all three at once: APFS is case-insensitive by default,
the runner is arm64 (some aarch64 coverage, which the flake claims to support
but never builds in CI), and it exercises the non-Linux rename fallback.

Suggested scope

A test-only job, not a second copy of the full gate. fmt, clippy,
audit and doc are platform-independent; re-running them buys nothing and
doubles the minutes. Nix is unnecessary too — dtolnay/rust-toolchain +
cargo test --locked is enough, and much faster than provisioning Nix on a
macOS runner.

  macos:
    name: Tests (macOS)
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo test --locked

Expected fallout — read this before landing

Adding the job turns CI red immediately. The failures are real information, not
noise, but they need handling in the right order.

Fixtures that collapse on a case-insensitive filesystem. These tests create
two entries in one directory whose names fold together, so the second write
overwrites the first and the fixture silently becomes a single file:

Fixtures in the same directory File
CAFÉ.TXT / Café.txt / café.txt tests/cli_tests.rs
CAFE.txt / cafe.txt tests/cli_tests.rs
Fichier.txt / fichier.txt tests/cli_tests.rs
Visible.txt / visible.txt tests/cli_tests.rs

These are test-harness bugs, fixable on their own: pick fixture names that stay
distinct under case folding (that is what most of the suite already does —
Fichier Test.txtfichier-test.txt differs by more than case).

Assertions blocked on #4. Visible.txtvisible.txt, Fichier.txt
fichier.txt and CAFE.txtcafe.txt are case-only renames, which macOS
currently refuses (#4). Those assertions cannot pass until #4 is fixed.

Suggested order:

  1. Fix the fixture collisions above (green on Linux, no behaviour change).
  2. Land the macOS job with the case-only assertions marked
    #[cfg_attr(target_os = "macos", ignore)], referencing Case-only renames rejected on case-insensitive filesystems (macOS) #4.
  3. Fix Case-only renames rejected on case-insensitive filesystems (macOS) #4, then drop the ignore — the test suite becomes the proof that the
    fix works, which is exactly what is missing today.

Blocks #4. Related: #5.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions