Skip to content

[Infra] Re-add cargo fmt --check and clippy gates to the contracts CI job #523

Description

@ogazboiz

Join the discussion on Telegram

Why this matters

Commit 2249aa6 (closing #460) added a dedicated Contracts CI workflow with two quality gates:

  • cargo fmt --all -- --check (formatting gate)
  • cargo clippy --all-targets -- -D warnings (lint gate)

A bad merge (feeefa2) then concatenated two full workflow definitions into .github/workflows/ci.yml, producing an invalid file. The follow-up cleanup commit 8f8749e ("remove duplicate workflow block that made ci.yml invalid") removed the entire prepended block — and with it the fmt and clippy gates and the rustfmt, clippy toolchain components.

The surviving contracts job in ci.yml now only builds the WASM, runs cargo test, runs tarpaulin coverage, and optimizes WASM. There is no formatting or lint gate left, so the work done for #460 is effectively gone. Unformatted code and clippy warnings can now merge to main unblocked (and a previous rebase already mangled a closing brace in the fuzz test, see 47ac389 — exactly the kind of thing a fmt/clippy gate catches).

Acceptance criteria

  • Add components: rustfmt, clippy to the toolchain setup step of the contracts job in .github/workflows/ci.yml.
  • Add a cargo fmt --all -- --check step (working-directory contracts).
  • Add a cargo clippy --all-targets -- -D warnings step (working-directory contracts). Note: clippy must NOT target wasm32-unknown-unknown, since test targets cannot build for wasm.
  • Place both gates before the build/test steps so style failures fail fast.
  • Confirm the workflow file is valid (single name/on/jobs block) and the gates pass on current main.

Files to touch

  • .github/workflows/ci.yml (the contracts job, lines ~114-138)

Out of scope

  • Splitting the combined ci.yml into per-area workflow files.
  • Changing the frontend/backend jobs.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programgithub_actionsPull requests that update GitHub Actions codeinfraCI/CD and infrastructurerustPull requests that update rust code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions