Installing from source

If pre-built binaries are not available for your platform, or you’d like to otherwise install cargo-nextest from source, here’s what you need to do:

Installing from crates.io

Run the following command:

  1. cargo install cargo-nextest

cargo nextest must be compiled and installed with Rust 1.54 or later, but it can build and run tests against any version of Rust.

Using a cached install in CI

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 cache the cargo-nextest binary.

  1. jobs:
  2. ci:
  3. # ...
  4. steps:
  5. - uses: actions/checkout@v2
  6. # Install a Rust toolchain here.
  7. - name: Install cargo-nextest
  8. uses: baptiste0928/cargo-install@v1
  9. with:
  10. crate: cargo-nextest
  11. version: 0.9
  12. # At this point, cargo-nextest will be available on your PATH

Also consider using the Swatinem/rust-cache action to make your builds faster.

Installing from GitHub

Install the latest, in-development version of cargo-nextest from the GitHub repository:

  1. cargo install --git https://github.com/nextest-rs/nextest --bin cargo-nextest