Skip to content

Add CI workflow and apply rustfmt formatting#10

Merged
intendednull merged 2 commits into
mainfrom
claude/check-ci-pipeline-6OIlB
Mar 29, 2026
Merged

Add CI workflow and apply rustfmt formatting#10
intendednull merged 2 commits into
mainfrom
claude/check-ci-pipeline-6OIlB

Conversation

@intendednull
Copy link
Copy Markdown
Owner

Summary

This PR introduces a comprehensive CI/CD pipeline and applies consistent code formatting across the codebase using rustfmt.

Key Changes

CI/CD Pipeline

  • New CI workflow (.github/workflows/ci.yml): Automated checks on push to main and pull requests
    • Format check using cargo fmt
    • Linting with clippy (all warnings treated as errors)
    • Unit tests via cargo test
    • WASM compatibility check for wasm32-unknown-unknown target
    • Caching of cargo registry and build artifacts for faster runs
  • Updated deploy workflow (.github/workflows/deploy.yml): Now depends on CI passing before deployment

Code Formatting

Applied rustfmt formatting across multiple files to improve consistency:

  • crates/storage/src/store.rs: Reformatted method chains and test code
  • crates/worker/src/actors/network.rs: Improved line wrapping for match expressions and async operations
  • crates/worker/tests/integration.rs: Consistent formatting of test assertions and message handling
  • crates/client/src/lib.rs: Reformatted unbounded_send calls and function arguments
  • crates/replay/src/main.rs & crates/storage/src/main.rs: Simplified tracing subscriber initialization
  • crates/web/src/icons.rs: Simplified format string calls

Type Safety Improvements

  • crates/common/src/worker_types.rs:
    • Wrapped WorkerResponse in Box for Response.payload to reduce enum size
    • Wrapped ServerState in Box for Snapshot.state to reduce enum size
    • Converted AllocationStrategy::Default impl to derive macro
  • crates/replay/src/role.rs: Updated snapshot response to use boxed state
  • crates/worker/tests/integration.rs: Updated test code to use boxed responses

Minor Refactoring

  • crates/storage/src/role.rs: Improved formatting of match expression for history queries
  • crates/client/src/worker_cache.rs: Better line wrapping for test helper calls
  • crates/client/src/ops.rs: Simplified re-export statement

Implementation Details

The CI workflow uses dtolnay/rust-toolchain@stable for consistent Rust versions and implements separate caching strategies per job to optimize build times. The WASM check excludes relay, worker, replay, and storage crates that don't target WASM.

https://claude.ai/code/session_019cmP1WsNbaf7AYLH7Naxgm

claude added 2 commits March 29, 2026 10:28
Add a CI workflow (fmt, clippy, test, WASM check) that runs on PRs and
pushes to main. Update the deploy workflow to depend on CI passing before
deploying. Fix formatting issues across the workspace.

https://claude.ai/code/session_019cmP1WsNbaf7AYLH7Naxgm
Box large enum variants (WorkerResponse in WorkerWireMessage::Response,
ServerState in WorkerResponse::Snapshot) and derive Default for
AllocationStrategy to satisfy clippy -D warnings.

https://claude.ai/code/session_019cmP1WsNbaf7AYLH7Naxgm
@intendednull intendednull merged commit 380fe7e into main Mar 29, 2026
4 checks passed
@intendednull intendednull deleted the claude/check-ci-pipeline-6OIlB branch March 29, 2026 16:08
@intendednull intendednull mentioned this pull request Apr 29, 2026
4 tasks
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.

2 participants