Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Nextest is used only by the e2e harness (crates/e2e/mise.toml `run` task,
# always with `--profile e2e`); the hermetic unit suite stays on plain
# `cargo test`, which compile-checks feature-gated targets in a way nextest
# does not replace.

[profile.e2e]
# Retry a failed test up to 2 more times before counting it as failed. The e2e
# suite occasionally flakes on GitHub runners (kind/apiserver hiccups), and a
# failed required check evicts the PR from the merge queue with no automatic
# requeue — so absorb the transient failure inside the check run instead.
# A retried-then-passed test is reported as FLAKY, keeping the flake visible
# in the job log rather than silently swallowed.
retries = 2
# The suite is stateful against one shared kind cluster and was previously run
# with libtest `--test-threads=1`; keep it serial. (`--no-capture` on the CLI
# also forces this, but state it here so the profile stands on its own.)
test-threads = 1
3 changes: 3 additions & 0 deletions .mise/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ kind = "0.32.0"
kopia = "v0.23.1"
"aqua:EmbarkStudios/cargo-deny" = "0.20.2"
"aqua:taiki-e/cargo-llvm-cov" = "0.8.7"
# Runs the e2e suite (crates/e2e `run` task) so individual flaky tests retry
# in-process-tree instead of failing the whole CI shard; see .config/nextest.toml.
"aqua:nextest-rs/nextest/cargo-nextest" = "0.9.140"
# Docs site toolchain. The docs are an MkDocs Material site (see `mise run docs`);
# the MkDocs + Material + pymdown-extensions versions are pinned in pyproject.toml
# / uv.lock and run via uv, so the only mise-managed tool here is uv itself (which
Expand Down
39 changes: 39 additions & 0 deletions .mise/mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 11 additions & 6 deletions crates/e2e/mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -356,20 +356,25 @@ set -eu
mkdir -p target/e2e; rm -f target/e2e/.diag-done
trap 'rc=$?; if [ "$rc" -ne 0 ]; then echo "==> e2e tests FAILED (rc=$rc) — dumping cluster diagnostics" >&2; mise run //crates/e2e:diagnostics || true; touch target/e2e/.diag-done; fi; exit $rc' EXIT
# KOPIUR_E2E_BINS — space-separated test-binary (file) names, expanded to repeated
# `--test <name>` flags BEFORE `--`, so a CI shard runs only its files. Empty ⇒ all.
# KOPIUR_E2E_TESTFILTER — libtest name-substring filter, kept AFTER `--`.
# `--test <name>` target flags, so a CI shard runs only its files. Empty ⇒ all.
# KOPIUR_E2E_TESTFILTER — name-substring filter (nextest positional filter).
BINS=""
for b in ${KOPIUR_E2E_BINS:-}; do BINS="$BINS --test $b"; done
# The CLI e2e (tests/cli.rs) runs the compiled plugin binary (`kopiur`) as a
# subprocess; build it here so the tests never race a stale/missing binary.
echo "==> building kopiur CLI (e2e subject)"
cargo build -p kopiur-cli --locked
echo "==> running e2e tests${KOPIUR_E2E_BINS:+ (binaries:$KOPIUR_E2E_BINS)}"
# `--no-fail-fast`: run EVERY test binary even when one fails, so a single flaky bin
# nextest instead of `cargo test` for the `e2e` profile's per-test retries
# (see .config/nextest.toml): a transient failure retries in place instead of
# failing the CI shard and evicting the PR from the merge queue.
# `--no-fail-fast`: run EVERY test even when one fails, so a single flaky bin
# (e.g. the heavyweight NFS/server backend test) can't hide the pass/fail of the rest.
# cargo still exits non-zero overall, so the trap + CI failure are unaffected.
cargo test -p kopiur-e2e --features e2e $BINS --no-fail-fast -- \
--include-ignored --test-threads=1 --nocapture ${KOPIUR_E2E_TESTFILTER:-}
# nextest still exits non-zero overall, so the trap + CI failure are unaffected.
# `--run-ignored all` ≙ libtest `--include-ignored`; `--no-capture` streams
# output live and keeps execution serial, like the old `--test-threads=1 --nocapture`.
cargo nextest run --profile e2e -p kopiur-e2e --features e2e $BINS --no-fail-fast \
--run-ignored all --no-capture ${KOPIUR_E2E_TESTFILTER:-}
echo "==> e2e tests passed"
'''

Expand Down