Verifies the source files of a Rust web assembly.
steps:
- uses: actions/checkout@v4
- uses: giancosta86/aurora-github/actions/verify-rust-wasm@v10
with:
wasm-pack-version: 0.13.1
npm-scope: your-npm-scope-
Invoke the install-wasm-pack action, passing all the matching inputs, to install the
wasm-packcommand. -
Invoke the verify-rust-crate action, passing all the matching inputs, to perform code analysis over the Rust source code.
-
Run
wasm-pack testto run headless browser tests on Chrome. -
Invoke generate-wasm-target to generate the NodeJS package source files in the pkg subdirectory.
-
If the directory referenced by the
client-tests-directoryinput exists, execute the run-custom-tests action on it, with theoptionalflag enabled.
-
rust-toolchain.tomlmust be present inproject-directory- as described in check-rust-versions -
Please, refer to the documentation of run-custom-tests for details about setting up a suitable structure for
client-tests-directory.
| Name | Type | Description | Default value |
|---|---|---|---|
wasm-pack-version |
string | The wasm-pack version to install |
|
npm-scope |
string | The npm package scope or <ROOT> |
|
client-tests-directory |
string | Relative directory containing the client tests | client-tests |
wasm-target |
string | The target of the wasm-pack build command |
web |
run-clippy-checks |
boolean | Enable linting via Clippy | true |
check-rustdoc |
boolean | Build the documentation - with warnings as errors | false |
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 |
. |