Skip to content

CICD-074 · Run locked Rust tests ​

Encyclopedia · Language build toolchains · All snippets

Previous · CICD-073 · Next · CICD-075

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites source repository with committed build manifest and pinned matching toolchain.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
cargo test --locked --all-targets

3. How it works ​

The shell predicate makes the expected state explicit and returns a nonzero status when it is not satisfied. The command archives or inspects the selected files. Verify the relative paths and file set before using the archive downstream.

4. Verify the result ​

Commit Cargo.lock when appropriate and verify the image Rust version.

Validation syntax-validated (Bash parse). Status definitions.