feat(ci): add fmt and unit tests for `rust` in CI

pull/3137/head
wszdexdrf 12 months ago committed by matejcik
parent 07ba960ab4
commit 379446cad7

@ -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

@ -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

@ -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)

Loading…
Cancel
Save