Skip to content

Latest commit

 

History

History
67 lines (39 loc) · 3.08 KB

File metadata and controls

67 lines (39 loc) · 3.08 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@v10

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

💡How it works

  1. Run check-project-license to verify the LICENSE file.

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

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

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

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

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

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

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

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

  10. 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