Skip to content

Commit

Permalink
ci: use nextest for running rust tests (#2031)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill authored May 18, 2022
1 parent 22c8012 commit a4f53b9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
13 changes: 13 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[profile.ci]
# Print out output for failing tests as soon as they fail, and also at the end
# of the run (for easy scrollability).
failure-output = "immediate-final"
# Show skipped tests in the CI output.
status-level = "skip"
# Do not cancel the test run on the first failure.
fail-fast = false
# Retry failing tests in order to not block builds on flaky tests
retries = 2

[profile.ci.junit]
path = "junit.xml"
14 changes: 5 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
# Disable caching on self-hosted jobs
# Enable caching of the 'librocksdb-sys' crate by additionally caching the
# 'librocksdb-sys' src directory which is managed by cargo
# - uses: bmwill/rust-cache@v1 # Fork of 'Swatinem/rust-cache' which allows caching additional paths
# with:
# path: ~/.cargo/registry/src/**/librocksdb-sys-*
- uses: taiki-e/install-action@nextest
- name: cargo test
run: |
cargo build --all-features --lib
cargo test --all-features --no-run # -j N # uncomment and set a low number if builds start OOMing again
cargo test --all-features
cargo nextest run --all-features --profile ci
- name: Doctests
run: |
cargo test --doc --all-features
# Ensure there are no uncommitted changes in the repo after running tests
- run: scripts/changed-files.sh

Expand Down

1 comment on commit a4f53b9

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bench results

�[0m�[1m�[33mwarning�[0m�[0m�[1m: unused import: collections::HashSet�[0m
�[0m �[0m�[0m�[1m�[38;5;12m--> �[0m�[0msui_core/src/full_node/full_node_state.rs:6:5�[0m
�[0m �[0m�[0m�[1m�[38;5;12m|�[0m
�[0m�[1m�[38;5;12m6�[0m�[0m �[0m�[0m�[1m�[38;5;12m| �[0m�[0m collections::HashSet,�[0m
�[0m �[0m�[0m�[1m�[38;5;12m| �[0m�[0m �[0m�[0m�[1m�[33m^^^^^^^^^^^^^^^^^^^^�[0m
�[0m �[0m�[0m�[1m�[38;5;12m= �[0m�[0m�[1mnote�[0m�[0m: #[warn(unused_imports)] on by default�[0m

�[0m�[0m�[1m�[33mwarning�[0m�[1m:�[0m sui_core (lib) generated 1 warning
�[0m�[0m�[1m�[32m Finished�[0m release [optimized] target(s) in 0.40s
�[0m�[0m�[1m�[32m Running�[0m target/release/bench microbench throughput
�[2m2022-05-18T15:40:14.537270Z�[0m �[32m INFO�[0m �[2msui::benchmark�[0m�[2m:�[0m benchmark �[3mbenchmark�[0m�[2m=�[0mBenchmark { committee_size: 1, send_timeout_us: 400000000, recv_timeout_us: 400000000, buffer_size: 65000, tcp_connections: 0, db_cpus: 1, use_native: false, batch_size: 2000, running_mode: SingleValidatorThread, working_dir: None, bench_type: MicroBenchmark { host: "127.0.0.1", port: 9555, type_: Throughput { num_transactions: 100000 } } }
�[2m2022-05-18T15:40:14.538200Z�[0m �[32m INFO�[0m �[2msui_config�[0m�[2m:�[0m Creating accounts and gas objects...
�[2m2022-05-18T15:40:14.538356Z�[0m �[32m INFO�[0m �[2msui_config::genesis�[0m�[2m:�[0m Loading Move framework lib from "/home/ubuntu/actions-runner/_work/sui/sui/sui_programmability/framework/deps/move-stdlib"
�[2m2022-05-18T15:40:14.563290Z�[0m �[32m INFO�[0m �[2msui_config::genesis�[0m�[2m:�[0m Loading Sui framework lib from "/home/ubuntu/actions-runner/_work/sui/sui/sui_programmability/framework"
�[2m2022-05-18T15:40:14.642402Z�[0m �[32m INFO�[0m �[2msui::benchmark::validator_preparer�[0m�[2m:�[0m authority address hex: 0x783c04dc06a999f38fbd805e1c14bb1a11f24322
�[2m2022-05-18T15:40:14.642504Z�[0m �[32m INFO�[0m �[2msui::benchmark::validator_preparer�[0m�[2m:�[0m Open database on path: "/tmp/DB_0xbcc32d6e22bcd8096ca8a82da57c33e9e93d9ec9"
�[2m2022-05-18T15:40:14.936527Z�[0m �[32m INFO�[0m �[2msui_storage::lock_service�[0m�[2m:�[0m LockService command processing loop started
�[2m2022-05-18T15:40:14.936535Z�[0m �[32m INFO�[0m �[2msui_storage::lock_service�[0m�[2m:�[0m LockService queries processing loop started
�[2m2022-05-18T15:40:15.624193Z�[0m �[32m INFO�[0m �[2msui::benchmark::validator_preparer�[0m�[2m:�[0m Spawning a validator thread...
�[2m2022-05-18T15:40:15.625610Z�[0m �[32m INFO�[0m �[2msui_core::authority_server�[0m�[2m:�[0m Listening to traffic on /dns/127.0.0.1/tcp/9555/http
Throughout: 31244.053865998627 tps

Please sign in to comment.