Skip to content

Commit cd1c330

Browse files
committed
Update CI / just configuration
Assisted-By: claude-sonnet-4.6 Signed-off-by: Daniel Alley <dalley@redhat.com>
1 parent 9f8e5d2 commit cd1c330

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

.justfile

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
clippy := "cargo clippy --quiet --workspace --no-deps --all-targets"
44
clippy_args := "-D warnings"
5-
nextest_args := "--locked --workspace"
65
udeps_args := "--quiet --workspace --all-features --all-targets"
76

87
# Perform all checks
98
[parallel]
10-
check: spell fmt fmt-readme doc lints deps unused-deps recipes test integration-test
9+
check: spell fmt fmt-readme doc lints deps unused-deps recipes test readme-shell
1110

1211
# Check spelling
1312
[group('ci')]
@@ -94,23 +93,24 @@ unused-deps:
9493
cargo +nightly machete
9594

9695
# Run unit tests
97-
[metadata('pacman', 'cargo-nextest')]
96+
[metadata('pacman', 'maturin', 'python', 'python-pytest')]
9897
test:
9998
#!/usr/bin/bash
10099
set -euxo pipefail
101100

101+
python -m venv --system-site-packages .venv
102+
source .venv/bin/activate
103+
maturin develop
102104
if [ "${CI:-}" = "true" ]; then
103-
PROFILE=ci
105+
mkdir -p target/pytest
106+
pytest --junit-xml=target/pytest/junit.xml tests/
104107
else
105-
PROFILE=default
108+
pytest tests/
106109
fi
107110

108-
cargo +nightly nextest run {{ nextest_args }} --profile "$PROFILE"
109-
cargo +nightly nextest run --no-default-features {{ nextest_args }} --profile "$PROFILE"
110-
111-
# Run integration tests
111+
# Run readme shell snippets
112112
[metadata('pacman', 'git', 'jq', 'openssh', 'tangler', 'tree')]
113-
integration-test:
113+
readme-shell:
114114
#!/usr/bin/bash
115115
set -euo pipefail
116116
cargo +nightly build --locked
@@ -119,8 +119,8 @@ integration-test:
119119

120120
# Report on all tests
121121
[group('ci')]
122-
[metadata('gitlabci-job', '{"coverage":"/Line coverage: ([0-9.]*)%/","artifacts":{"when":"always","reports":{"junit":"target/nextest/ci/junit.xml","metrics":"target/metrics.txt","coverage_report":{"coverage_format":"cobertura","path":"target/coverage.xml"}}}}')]
123-
[metadata('pacman', 'rust', 'cargo-llvm-cov', 'rustup', 'python')]
122+
[metadata('gitlabci-job', '{"coverage":"/Line coverage: ([0-9.]*)%/","artifacts":{"when":"always","reports":{"junit":"target/pytest/junit.xml","metrics":"target/metrics.txt","coverage_report":{"coverage_format":"cobertura","path":"target/coverage.xml"}}}}')]
123+
[metadata('pacman', 'rust', 'cargo-llvm-cov', 'rustup', 'maturin', 'python')]
124124
report-test:
125125
#!/usr/bin/bash
126126
# enabling "x" here will garble text output that's parsed by GitLab for code coverage
@@ -129,10 +129,10 @@ report-test:
129129
rustup component add --toolchain nightly llvm-tools-preview
130130

131131
# shellcheck disable=SC1090
132-
source <(cargo +nightly llvm-cov show-env --export-prefix --doctests --branch)
132+
source <(cargo +nightly llvm-cov show-env --export-prefix --branch)
133133
cargo +nightly llvm-cov clean
134134

135-
just test integration-test
135+
RUSTUP_TOOLCHAIN=nightly just test
136136

137137
# explicitly use "target" (even if CARGO_TARGET_DIR is somewhere else) so that
138138
# local tools (such as https://github.com/ryanluker/vscode-coverage-gutters) can find the file
@@ -233,10 +233,10 @@ fix:
233233
# fmt must be last as clippy changes may break formatting
234234
cargo +nightly fmt --all
235235
236-
# Run README integration tests
236+
# Run README code snippets
237237
[group('ci')]
238238
[metadata('pacman', 'rust', 'python', 'tangler')]
239-
readme:
239+
readme-python:
240240
#!/usr/bin/env bash
241241
set -euo pipefail
242242

0 commit comments

Comments
 (0)