diff --git a/Makefile b/Makefile index 77b2c91e5..703dd1c63 100644 --- a/Makefile +++ b/Makefile @@ -86,11 +86,13 @@ defs_check: ## check validity of coin definitions and protobuf files ruststyle: @echo [RUSTFMT] @cd core/embed/rust ; cargo fmt + @cd rust/trezor-client ; cargo fmt ruststyle_check: rustfmt --version @echo [RUSTFMT] @cd core/embed/rust ; cargo fmt -- --check + @cd rust/trezor-client ; cargo fmt -- --check python_support_check: ./tests/test_python_support.py diff --git a/ci/test.yml b/ci/test.yml index 9d131941b..ce2b56416 100644 --- a/ci/test.yml +++ b/ci/test.yml @@ -674,6 +674,15 @@ python support test: script: - $NIX_SHELL --run "poetry run make python_support_check | ts -s" +# Rust + +rust test: + stage: test + <<: *gitlab_caching + needs: + - core unix frozen debug build + script: + - $NIX_SHELL --run "poetry run core/emu.py --headless -q --temporary-profile --slip0014 --command cargo test --manifest-path rust/trezor-client/Cargo.toml | ts -s" # Storage diff --git a/docs/ci/jobs.md b/docs/ci/jobs.md index 27e6da4ed..586313484 100644 --- a/docs/ci/jobs.md +++ b/docs/ci/jobs.md @@ -142,7 +142,7 @@ Bitcoin-only version. ## TEST stage - [test.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml) All the tests run test cases on the freshly built emulators from the previous `BUILD` stage. -Consists of **35 jobs** below: +Consists of **36 jobs** below: ### [core unit python test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L15) Python unit tests, checking core functionality. @@ -226,11 +226,13 @@ Legacy device test - UI. ### [python support test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L670) -### [storage test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L680) +### [rust test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L679) -### [core unix memory profiler](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L704) +### [storage test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L689) -### [connect test core](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L728) +### [core unix memory profiler](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L713) + +### [connect test core](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L737) --- ## TEST-HW stage - [test-hw.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/test-hw.yml)