Skip to content

Every Rust workspace passes fmt, clippy and tests on its target platforms #318

Open

Description

@irzhywau

Part of #311 (Group D, CI coverage). Owner: not assigned. Task base and PR target: develop. Start after #317 merges (same file). Coordinate with #194 Part 2, which deletes low-value tests.

Intended behavior

CI checks every Rust workspace in the repository on the platforms where its code runs: format, clippy with -D warnings, and tests.

Current behavior

  • cargo fmt --check runs only for the elastos workspace (ci.yml:56-58). test-capsules runs clippy and tests for capsules/* (ci.yml:312-318), but no format check.
  • The nine elastos/tools/* workspaces are never clippy-checked or tested in CI:
    • browser-engine-supervisor, browser-local-exit, browser-native-proxy-engine, browser-playwright-engine, browser-stream-bridge;
    • browser-vm-guest-control-bridge, browser-vm-runtime-relay, componentize, vsock-proxy.
  • test-elastos builds two of them (ci.yml:257-258). justfile:195-199 covers only browser-local-exit, and only in just verify.
  • No CI job runs clippy or cargo test on macOS. Code behind cfg(target_os = "macos"), for example in the elastos-vz crate, is compiled by the source-home build but never linted or tested.

Implementation notes

  • Format: loop over every Cargo.toml workspace root in the existing lint job; this is cheap.
  • Tools: add a test-tools job, or extend test-capsules to elastos/tools/*. It shares target-build through .cargo/config.toml.
  • macOS: add clippy and tests for the crates that contain macOS-only code to the macOS job, or to a new macOS job. Keep the cost low with the compiler cache (CI speed: make the compiler cache store entries and shorten the macOS path #310, item 1).

Done means

  • Every workspace passes cargo fmt --check. Test: a deliberate format error in a capsule fails CI (one test PR).
  • Every elastos/tools/* workspace passes clippy with -D warnings and its tests in CI. Proof: the job log.
  • macOS-only code passes clippy and its tests on a macOS runner. Proof: the job log.
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions