Skip to content

CI: run unit/integration tests for each crate of the workspace #1551

@dannywillems

Description

@dannywillems

Workspace crates to test:

(actual crate-name in brackets)

  • core (mina-core)
  • macros (mina-macros)
  • ledger (mina-tree)
  • snark
  • p2p
  • p2p/testing (p2p-testing)
  • p2p/libp2p-rpc-behaviour (libp2p-rpc-behaviour)
  • node
  • node/account (mina-node-account)
  • node/common (mina-node-common)
  • node/native (mina-node-native)
  • node/web (mina-node-web)
  • node/invariants (mina-node-invariants)
  • node/testing (mina-node-testing)
  • cli
  • cli/replay_dynamic_effects (replay_dynamic_effects)
  • vrf
  • mina-p2p-messages
  • poseidon
  • tools/transport (mina-transport)
  • tools/bootstrap-sandbox (mina-bootstrap-sandbox)
  • tools/gossipsub-sandbox (mina-gossipsub-sandbox)
  • tools/hash-tool (hash-tool)
  • tools/ledger-tool (ledger-tool)
  • tools/salsa-simple (salsa-simple)
  • tools/fuzzing (transaction_fuzzer)
  • tools/archive-breadcrumb-compare (mina-archive-breadcrumb-compare)
  • tools/heartbeats-processor (heartbeats-processor)
  • tools/webrtc-sniffer (webrtc-sniffer)
  • producer-dashboard (mina-producer-dashboard)
  • fuzzer (mina-fuzzer)

Plan

Phase 1: Consolidate Unit Tests and Introduce nextest

  • In the new workflow, create a single job unit-tests that runs all unit tests for all crates using cargo nextest run --workspace --lib --all-features..

Phase 2: Dynamic Integration Test Jobs

We don't want to have to manually look at all the jobs to identify which crates are or aren't tested.

  • Create a "discover" job that programmatically finds all crates with integration tests.
    • This job should output a JSON array of crate names.
  • Create a "matrix" job that uses the output of the "discover" job to dynamically generate a matrix of integration test jobs.
    • Each job in the matrix will run the integration tests for a single crate.
  • Create a "final" job that depends on all the jobs in the matrix and provides a single "pass/fail" signal for the entire integration test suite.

Metadata

Metadata

Labels

rustPull requests that update Rust codetestIssue related to testing

Type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions