-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathjustfile
More file actions
48 lines (42 loc) · 1.21 KB
/
Copy pathjustfile
File metadata and controls
48 lines (42 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
set shell := ["bash", "-euox", "pipefail", "-c"]
# List available recipes
_default:
@just --list --unsorted
# Bootstrap the environment for running the test suite
bootstrap:
#!/usr/bin/env bash
set -euox pipefail
# Compile translations
cd tests && django-admin compilemessages
# Build the Rust extension and run the Python test suite (extra args forwarded to pytest)
[group('test')]
python-test *ARGS:
maturin develop
pytest {{ARGS}}
# Run the Python test suite under coverage
[group('coverage')]
python-coverage:
maturin develop
pytest --cov
# Print a terminal Rust coverage report from the Python test suite
[group('coverage')]
rust-coverage:
#!/usr/bin/env bash
set -euox pipefail
cargo llvm-cov clean --workspace
source <(cargo llvm-cov show-env --sh)
cargo llvm-cov --no-report
maturin develop
pytest
cargo llvm-cov report
# Generate an HTML Rust coverage report and open it in the browser
[group('coverage')]
rust-coverage-browser:
#!/usr/bin/env bash
set -euox pipefail
cargo llvm-cov clean --workspace
source <(cargo llvm-cov show-env --sh)
cargo llvm-cov --no-report
maturin develop
pytest
cargo llvm-cov report --open