Skip to content

ci: add GitHub Actions workflow for fmt, lint, build, and test - #7

Merged
assafvayner merged 6 commits into
mainfrom
assafvayner/ci-github-actions
May 8, 2026
Merged

assafvayner merged 6 commits into
mainfrom
assafvayner/ci-github-actions

Conversation

@assafvayner

Copy link
Copy Markdown
Owner

Summary

  • Add .github/workflows/ci.yml with two jobs:
    • Format & Lint — cargo +nightly fmt --all -- --check and cargo clippy --workspace --all-targets --all-features -- -D warnings
    • Build & Test — cargo build --workspace --all-targets --all-features and cargo test --workspace --all-features
  • Triggers on pushes to main and on all pull requests, with concurrency cancellation for non-main refs.
  • Installs protoc (required by daccord-demo's tonic-build) and uses Swatinem/rust-cache with a shared key across jobs.
  • --all-features activates duckdb-bundled, so the duckdb system library is not required on runners.

Test plan

  • CI run on this draft PR completes both jobs successfully
  • Format & Lint job catches a deliberately mis-formatted file (manual sanity check before un-drafting)
  • Build & Test job runs feature-gated tests (multi-paxos, redb, duckdb)

Adds a single CI workflow with two jobs: one for `cargo +nightly fmt`
and `cargo clippy`, and one for `cargo build` and `cargo test`. Both
jobs install protoc (required by `daccord-demo`'s `tonic-build`) and
use the standard rust-cache to keep runs fast.
Required for the new CI fmt-check job to pass — current nightly rustfmt
collapses several multi-line signatures and string-into calls onto a
single line, and reorders the cfg-gated `redb` re-exports.
The previous proto change added `start_index` and made `limit` optional,
but the CLI binary and chaos-harness test still constructed an empty
`GetDecisionsRequest {}`, breaking the build. Set `start_index = 0`
and `limit = None` to preserve "fetch from the beginning, server-default
limit" behavior.
@assafvayner
assafvayner marked this pull request as ready for review May 8, 2026 06:12
…tes"

Revert "chore(demo-proto): make GetDecisionsRequest.limit optional"

These were not part of the CI-workflow PR. Reverting both keeps this
branch focused on adding `.github/workflows/ci.yml` and the rustfmt
fixes required for it to pass. The proto change (and its dependent
demo updates) can land in a separate PR.

This reverts commits d3b3322 and 7db5afb.
`proposals_from_different_nodes` reliably fails on GitHub-hosted runners
with the previous 5s per-decision timeout — three concurrent proposers
on a 3-node cluster can take longer than 5s to converge under runner
load even when the algorithm is healthy. Locally tests still complete
in well under 5s, so the bump only affects the slow-runner case.
@assafvayner
assafvayner merged commit 9ef1d10 into main May 8, 2026
2 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