-
Notifications
You must be signed in to change notification settings - Fork 0
Development and testing
Rust 1.89+, Python 3.10+, and prek for the repository hooks:
prek install --hook-type pre-commit --hook-type pre-pushFormatting, Ruff (including docstring rules), YAML/TOML and workflow lint run
on commit; Clippy runs on push.
prek run --all-files checks everything, as CI does.
cargo test --workspace --locked # unit, integration, end-to-end, doctests
python -m pip install . && python -m unittest discover -s tests/python -vPython tests need the built package installed. python -m unittest discover -s scripts/tests covers the repository scripts, including the install
scripts against a local fake release (install.ps1 too, when pwsh is
installed). Three layers:
-
Offline end-to-end (
crates/cli/tests/e2e.rs): the real executable with a cross-platform Pixi stand-in on every CI host. -
Native integration (ignored by default): real Pixi, uv, cargo,
conda-lock, Grype, pypi.org, crates.io and the GitHub API, plus a download
of the pinned uv.
PIXI=… UV=… CARGO=… CONDA_LOCK=… CONDA_SOLVER=… GRYPE=… GITHUB_TOKEN=… cargo test --workspace -- --ignored, andPIXI=…for the native Python tests. -
CLI/Python parity (
tests/python/test_parity.py).
Public Rust items and the public Python API must be documented (missing_docs,
Ruff D); cargo doc runs with warnings as errors. Follow the glossary in
CONTEXT.md. The CLI reference and Python API
pages are generated: run python scripts/gen-reference.py (with the package
installed) after changing help text or docstrings. CI's docs-reference job
fails when they are stale or a wiki link is broken.
- CI builds and tests on Linux, Windows and macOS (Intel and Apple Silicon), checks Rust 1.89, the sdist, the conda recipe, the end-to-end tests and prek.
-
Distribution: the
cratesjob packages and verifies both crates as crates.io would (cargo publish --workspace --dry-run);install-scriptsruns the install script tests on macOS and Windows. - Coverage: Codecov requires 80% of changed lines covered, and the in-repo gate requires 75% total line coverage.
-
Integration runs the native tests on pull requests (informational), on
main, nightly (failures open anightly-integrationissue) and before releases. -
Latest tools runs weekly. A tool's candidate is its highest stable
release published at least 7 days ago and newer than the tested one, so new
releases settle first and nothing moves back. Integration runs once per
candidate with only that tool changed. When it passes on every OS,
scripts/tool-drift.pyopens a pull request onlatest-tools/<tool>that bumps the adapter'stested_versions, its pinned downloads inprovision.rs(with the release's sha256 digests) and its pin in.github/tool-versions.jsontogether; review and land it like any other. A candidate that breaks Integration, a pinned download that is gone or whose sha256 changed, or a bump that cannot be made opens alatest-toolsissue instead (one per tool). cargo, which CI runs as stable Rust, is never bumped automatically.crates/core/tests/pins.rschecks the pins agree with the tested versions. - Changes reach
mainthrough pull requests with signed commits; the required checks must pass.