diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7d6cd8a..7d4465a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,6 +151,8 @@ jobs: toolchain: ${{ matrix.toolchain }} - name: Install cargo-make uses: taiki-e/install-action@cargo-make + - name: Install cargo-make + uses: taiki-e/install-action@nextest - name: Test ${{ matrix.backend }} run: cargo make test-backend ${{ matrix.backend }} env: diff --git a/Makefile.toml b/Makefile.toml index 564d726b..ba2811d1 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -90,12 +90,21 @@ args = [ "warnings", ] +[tasks.install-nextest] +description = "Install cargo-nextest" +install_crate = { crate_name = "cargo-nextest", binary = "cargo-nextest", test_arg = "--help" } + [tasks.test] description = "Run tests" -dependencies = ["test-doc"] +run_task = { name = ["test-lib", "test-doc"] } + +[tasks.test-lib] +description = "Run default tests" +dependencies = ["install-nextest"] command = "cargo" args = [ - "test", + "nextest", + "run", "--all-targets", "--no-default-features", "${ALL_FEATURES_FLAG}", @@ -109,9 +118,11 @@ args = ["test", "--doc", "--no-default-features", "${ALL_FEATURES_FLAG}"] [tasks.test-backend] # takes a command line parameter to specify the backend to test (e.g. "crossterm") description = "Run backend-specific tests" +dependencies = ["install-nextest"] command = "cargo" args = [ - "test", + "nextest", + "run", "--all-targets", "--no-default-features", "--features",