Skip to content

Commit ebecc2b

Browse files
committed
feat(test): extend just test to support --coverage and --html flags
Update just test to accept --coverage and --html, delegating to a new coverage recipe. Currently covers Python only.
1 parent db7174f commit ebecc2b

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

justfile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,27 @@ wheels:
1818
check:
1919
{{ ninja }} pylib qt check
2020

21-
# Run all tests (Rust, Python, TypeScript)
22-
test:
23-
{{ ninja }} check:rust_test check:pytest check:vitest
21+
# Run all tests (Rust, Python, TypeScript). Pass --coverage to enforce coverage, and --html to include HTML reports.
22+
[arg("coverage", long="coverage", value="--coverage")]
23+
[arg("html", long="html", value="--html")]
24+
test coverage='' html='':
25+
just {{ if coverage == "--coverage" { "coverage " + html } else { "_test" } }}
26+
27+
# Run coverage for all test stacks. Pass --html to also generate HTML reports.
28+
[arg("html", long="html", value="--html")]
29+
coverage html='':
30+
just _coverage-py {{ html }}
2431

2532
# Run Python tests (pylib + qt). Pass --coverage to enforce coverage, and --html to include HTML reports.
2633
[arg("coverage", long="coverage", value="--coverage")]
2734
[arg("html", long="html", value="--html")]
2835
test-py coverage='' html='':
2936
just {{ if coverage == "--coverage" { "_coverage-py " + html } else { "_test-py" } }}
3037

38+
[private]
39+
_test:
40+
{{ ninja }} check:rust_test check:pytest check:vitest
41+
3142
[private]
3243
_test-py:
3344
{{ ninja }} check:pytest

uv.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)