Skip to content

Latest commit

 

History

History
63 lines (37 loc) · 2.9 KB

File metadata and controls

63 lines (37 loc) · 2.9 KB

verify-rust-crate

Verifies the source files of a Rust crate.

Example

steps:
  - uses: actions/checkout@v4

  - uses: giancosta86/aurora-github/actions/verify-rust-crate@v7

Please, note: this action is automatically run by verify-rust-wasm.

How it works

  1. Run enforce-branch-version, forwarding the enforce-branch-version input to its mode input.

  2. Display the version info for the main components of the Rust toolchain - verifying the existence of rust-toolchain.toml.

  3. Check the style of the Rust source files - via cargo fmt.

  4. Perform lint checks via cargo clippy, enabling all features and targets. All warnings are considered errors. This step can be skipped.

  5. Extract each code snippet from README.md - if the file exists - as a standalone test file in the tests directory, via extract-rust-snippets.

  6. Run cargo test with all the project features disabled.

  7. Run cargo test with all the project features enabled.

  8. Generate the documentation, with all the project features enabled. All warnings are considered errors. This step can be skipped.

  9. Find critical TODOs in the source code - which crash the workflow by default.

Requirements

  • rust-toolchain.toml must be present in project-directory - as described in check-rust-versions

Inputs 📥

Name Type Description Default value
run-clippy-checks boolean Enable linting via Clippy true
check-rustdoc boolean Build the documentation - with warnings as errors true
crash-on-critical-todos boolean Crash the workflow if critical TODOs are found true
source-file-regex string PCRE pattern describing the source files view source
enforce-branch-version inject,check,skip How the branch version should be enforced inject
project-directory string The directory containing Cargo.toml .

Further references