Skip to content

Run fmt, clippy and tests in CI - #79

Merged
define-null merged 2 commits into
mainfrom
ci-checks
Sep 24, 2026
Merged

define-null merged 2 commits into
mainfrom
ci-checks

Conversation

@define-null

Copy link
Copy Markdown
Contributor

Summary

Nothing checks formatting, lints or tests before a change is merged. This PR adds a ci workflow that runs these checks on every pull request and on every push to main, and fixes the findings already on main so the workflow starts green.

Changes

  • Add .github/workflows/ci.yml with three jobs:

    • fmt: cargo fmt --all -- --check
    • clippy: cargo clippy --workspace --all-targets --locked -- -D warnings
    • test: cargo test --workspace --locked

    The jobs use the toolchain pinned in rust-toolchain (1.83), install protobuf-compiler for sqd-messages, and cache builds with Swatinem/rust-cache.

  • Fix what the checks currently report on main:

    • Run cargo fmt on collector-utils and router-controller (formatting only).
    • pings-collector: remove the signal-handling loop, which could only run once (clippy::never_loop, an error), and a redundant closure. Behaviour is unchanged.
    • router-controller: use an array for a test fixture (clippy::useless_vec).

Testing

All three commands pass locally on the pinned toolchain. This PR's own CI run is the first run of the workflow.

🤖 Generated with Claude Code

define-null and others added 2 commits September 24, 2026 12:01
Run cargo fmt on collector-utils and router-controller. In
pings-collector, drop the signal-handling loop that could only run
once (clippy::never_loop, an error) and a redundant closure. Use an
array for a router-controller test fixture (clippy::useless_vec).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Check every pull request and push to main with cargo fmt --check,
cargo clippy -D warnings and cargo test on the pinned toolchain.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@define-null
define-null merged commit d3add55 into main Sep 24, 2026
3 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.

1 participant