mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-22 12:43:16 +00:00
chore(ci): use cargo-nextest for running tests (#717)
* chore(ci): use cargo-nextest for running tests * refactor(make): run library tests before doc tests
This commit is contained in:
parent
9574198958
commit
8d77b734bb
2 changed files with 16 additions and 3 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -151,6 +151,8 @@ jobs:
|
||||||
toolchain: ${{ matrix.toolchain }}
|
toolchain: ${{ matrix.toolchain }}
|
||||||
- name: Install cargo-make
|
- name: Install cargo-make
|
||||||
uses: taiki-e/install-action@cargo-make
|
uses: taiki-e/install-action@cargo-make
|
||||||
|
- name: Install cargo-make
|
||||||
|
uses: taiki-e/install-action@nextest
|
||||||
- name: Test ${{ matrix.backend }}
|
- name: Test ${{ matrix.backend }}
|
||||||
run: cargo make test-backend ${{ matrix.backend }}
|
run: cargo make test-backend ${{ matrix.backend }}
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -90,12 +90,21 @@ args = [
|
||||||
"warnings",
|
"warnings",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tasks.install-nextest]
|
||||||
|
description = "Install cargo-nextest"
|
||||||
|
install_crate = { crate_name = "cargo-nextest", binary = "cargo-nextest", test_arg = "--help" }
|
||||||
|
|
||||||
[tasks.test]
|
[tasks.test]
|
||||||
description = "Run tests"
|
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"
|
command = "cargo"
|
||||||
args = [
|
args = [
|
||||||
"test",
|
"nextest",
|
||||||
|
"run",
|
||||||
"--all-targets",
|
"--all-targets",
|
||||||
"--no-default-features",
|
"--no-default-features",
|
||||||
"${ALL_FEATURES_FLAG}",
|
"${ALL_FEATURES_FLAG}",
|
||||||
|
@ -109,9 +118,11 @@ args = ["test", "--doc", "--no-default-features", "${ALL_FEATURES_FLAG}"]
|
||||||
[tasks.test-backend]
|
[tasks.test-backend]
|
||||||
# takes a command line parameter to specify the backend to test (e.g. "crossterm")
|
# takes a command line parameter to specify the backend to test (e.g. "crossterm")
|
||||||
description = "Run backend-specific tests"
|
description = "Run backend-specific tests"
|
||||||
|
dependencies = ["install-nextest"]
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = [
|
args = [
|
||||||
"test",
|
"nextest",
|
||||||
|
"run",
|
||||||
"--all-targets",
|
"--all-targets",
|
||||||
"--no-default-features",
|
"--no-default-features",
|
||||||
"--features",
|
"--features",
|
||||||
|
|
Loading…
Reference in a new issue