ci: unified workflow (lint + typecheck + build + rust)#106
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Addresses 6 of the 8 clippy findings surfaced by the new rust CI job: - needless_return (server.rs) - match_like_matches_macro (server.rs) - ptr_arg: &Vec<T> -> &[T] (event_filter.rs) - needless_borrow (event_filter.rs) - manual_is_multiple_of (event_listener.rs) - clone_on_copy (serializable_event.rs) Remaining (require manual judgment, deferred): large_enum_variant (server.rs), should_implement_trait for from_str (event_listener.rs).
- large_enum_variant: box the 640-byte Event variant of EventDataOrMetrics (Event(Box<EventData>)). Since From::from infers its parameter type from the argument (deref coercion does not apply), the match-site call passes &*event_data to select From<&EventData>; construction uses Box::new(..). - should_implement_trait: rename inherent EventName::from_str -> from_name (and its single caller) so it no longer shadows std::str::FromStr::from_str.
Surfaced once the lib compiled clean: timestamp_ns is u64, so the (u64 - u64) as u64 casts are redundant; drop the cast and parens.
Greptile SummaryThis PR consolidates several previously separate (or absent) CI workflows into a single
Confidence Score: 5/5Safe to merge — this is a straightforward CI consolidation with no changes to application logic. All four jobs are additive or direct migrations of existing checks. The lint job is a verbatim move from the deleted lint.yml with broadened triggers. The typecheck and build jobs are independent and correct. The Rust job properly installs git before checkout, runs inside the matching container image, and uses a pinned Rust version consistent with the backend Dockerfile comment. No files require special attention.
|
| Filename | Overview |
|---|---|
| .github/workflows/ci.yml | New unified CI workflow consolidating lint, typecheck, build, and Rust jobs; all four jobs run in parallel on pull_request, push to main, and workflow_dispatch |
| .github/workflows/lint.yml | Deleted — lint job migrated verbatim into ci.yml with an expanded trigger set (push to main, workflow_dispatch added) |
| frontend/package.json | Adds typecheck script (tsc --noEmit) consumed by the new typecheck CI job; typescript is already in devDependencies |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
trigger["Trigger\n(PR / push main / workflow_dispatch)"]
trigger --> lint
trigger --> typecheck
trigger --> build
trigger --> rust
subgraph lint["lint (ubuntu-latest)"]
L1[Checkout] --> L2[Cache Biome]
L2 --> L3[Setup Biome 2.1.2]
L3 --> L4[biome ci]
end
subgraph typecheck["typecheck (ubuntu-latest)"]
T1[Checkout] --> T2[pnpm setup]
T2 --> T3[pnpm install]
T3 --> T4["pnpm typecheck\ntsc --noEmit"]
end
subgraph build["build (ubuntu-latest)"]
B1[Checkout] --> B2[pnpm setup]
B2 --> B3[pnpm install]
B3 --> B4["pnpm build\nnext build"]
end
subgraph rust["rust (rust:1.91-slim container)"]
R1[apt-get install deps] --> R2[Checkout]
R2 --> R3[rustup add rustfmt+clippy]
R3 --> R4[rust-cache]
R4 --> R5[cargo fmt --check]
R5 --> R6["cargo clippy\n--all-targets --all-features\n-D warnings"]
R6 --> R7["cargo build\n--all-targets"]
end
Reviews (2): Last reviewed commit: "Merge branch 'main' into reopen/100-unif..." | Re-trigger Greptile
Replacement for #100, which GitHub marked as merged into a non-main branch before the changes landed on main.
This PR is stacked on #109 because it introduces the Rust clippy CI job, which requires the clippy fixes from #109 to pass. The diff remains focused on the original CI workflow changes.