Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix cargo unit tests execution #1041

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

clispios
Copy link
Contributor

The current test command cargo test --verbose does not account for running tests in the nested cargo modules. A simple change to cargo test --all --verbose fixes that issue.

Without --all:

    Running `/home/runner/work/yazi/yazi/target/debug/deps/ya-2ddc42514f24a284`

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running `/home/runner/work/yazi/yazi/target/debug/deps/yazi-b4da7ef94736c14f`

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

With --all:

     Running unittests src/lib.rs (target/debug/deps/yazi_adaptor-3992d172dc5e1838)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/yazi_boot-804b0c53646b3f36)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/main.rs (target/debug/deps/ya-1f8738ac6f247f0c)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/yazi_config-99e4030f6791d6b2)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/yazi_core-9913435dccadf027)

running 16 tests
test tab::backstack::tests::test_backstack ... ok
test tab::selected::tests::insert_many_empty_urls_list ... ok
test completion::commands::trigger::tests::test_split ... ok
test tab::selected::tests::insert_many_sibling_directories_success ... ok
test tab::selected::tests::insert_many_success ... ok
test tab::selected::tests::insert_many_with_direct_parent_fails ... ok
test tab::selected::tests::insert_many_with_grandchild_fails ... ok
test tab::selected::tests::insert_many_with_existing_parent_fails ... ok
test tab::selected::tests::insert_many_with_nested_child_fails ... ok
test tab::selected::tests::insert_many_with_existing_child_fails ... ok
test tab::selected::tests::test_insert_conflicting_child ... ok
test tab::selected::tests::insert_many_with_parent_as_child_of_another_url ... ok
test tab::selected::tests::test_insert_conflicting_parent ... ok
test tab::selected::tests::test_insert_many_with_remove ... ok
test tab::selected::tests::test_insert_non_conflicting ... ok
test tab::selected::tests::test_remove ... ok

test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/yazi_dds-b93cb0d59d9beef6)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/main.rs (target/debug/deps/yazi-a8d949bfa0b905b3)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/yazi_plugin-5fa091f978a947a3)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/yazi_proxy-18581c75f53730bc)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/yazi_scheduler-db3a51ac14893e53)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/yazi_shared-eba9b353125cf154)

running 3 tests
test fs::fns::test_max_common_root ... ok
test fs::path::tests::test_path_relative_to ... ok
test natsort::tests::test_natsort ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests yazi_adaptor

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests yazi_boot

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests yazi_config

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests yazi_core

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests yazi_dds

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests yazi_plugin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests yazi_proxy

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests yazi_scheduler

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests yazi_shared

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

@sxyazi sxyazi changed the title ci: fix: cargo unit tests execution ci: fix cargo unit tests execution May 15, 2024
Copy link
Owner

@sxyazi sxyazi left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@sxyazi sxyazi merged commit dcd23f2 into sxyazi:main May 15, 2024
6 checks passed
@clispios clispios deleted the fix-ci-testing branch May 15, 2024 16:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants