sagiegurari / cargo-make

Rust task runner and build tool.
https://sagiegurari.github.io/cargo-make/
Apache License 2.0
2.53k stars 123 forks source link

replace cargo test with cargo nextest run for better performance & test summary report #1014

Open ben1009 opened 8 months ago

ben1009 commented 8 months ago

Feature Description

as the title

Describe The Solution You'd Like

Code Sample

/// paste code here
sagiegurari commented 8 months ago

@ben1009 interesting idea, but why replace it by default and not in your extended makefile?

the original test task is defined as follows:

[tasks.test]
description = "Runs all available tests."
category = "Test"
install_crate = false
toolchain = "${CARGO_MAKE_RUST_DEFAULT_TOOLCHAIN}"
command = "cargo"
args = [
  "test",
  "@@remove-empty(CARGO_MAKE_CARGO_VERBOSE_FLAGS)",
  "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )",
]

you can replace the command arguments to something else (just the delta) for example in your makefile add:

[tasks.test]
args = ["nextest", "run"]

and it should work i think.

ben1009 commented 7 months ago

@ben1009 interesting idea, but why replace it by default and not in your extended makefile?

the original test task is defined as follows:

[tasks.test]
description = "Runs all available tests."
category = "Test"
install_crate = false
toolchain = "${CARGO_MAKE_RUST_DEFAULT_TOOLCHAIN}"
command = "cargo"
args = [
  "test",
  "@@remove-empty(CARGO_MAKE_CARGO_VERBOSE_FLAGS)",
  "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )",
]

you can replace the command arguments to something else (just the delta) for example in your makefile add:

[tasks.test]
args = ["nextest", "run"]

and it should work i think.

yes, but what i means is from contributor's perspective. The test results from cargo test is not easy to read, besides some tests seems fail always. Not sure it's expected or not https://github.com/sagiegurari/cargo-make/actions/runs/7537960284/job/20517689511#step:5:5189

sagiegurari commented 7 months ago

oh, you mean replace cargo-make own tests, not the general built in test task in the internal makefile?

ben1009 commented 7 months ago

oh, you mean replace cargo-make own tests, not the general built in test task in the internal makefile?

yes, the one triggered by cargo make ci-flow in ci