If pre-built binaries are not available for your platform, or you'd otherwise like to install cargo-nextest from source, here's what you need to do:
Run the following command:
cargo install cargo-nextest --locked
Note: A plain
cargo install cargo-nextestwithout
--lockedis not supported. If you run into build issues, please try with
--lockedbefore reporting an issue.
cargo nextest must be compiled and installed with Rust 1.64 or later (see Stability policy for more), but it can build and run
tests against any version of Rust.
Most CI users of nextest will benefit from using cached binaries. Consider using the pre-built binaries for this purpose.
If your CI is based on GitHub Actions, you may use the baptiste0928/cargo-install action to build cargo-nextest from source and cache the cargo-nextest binary.
jobs: ci: # ... steps: - uses: actions/checkout@v3 # Install a Rust toolchain here. - name: Install cargo-nextest uses: baptiste0928/cargo-install@v1 with: crate: cargo-nextest locked: true # Uncomment the following line if you'd like to stay on the 0.9 series # version: 0.9 # At this point, cargo-nextest will be available on your PATH
Also consider using the Swatinem/rust-cache action to make your builds faster.
Install the latest, in-development version of cargo-nextest from the GitHub repository:
cargo install --git https://github.com/nextest-rs/nextest --bin cargo-nextest