From 38db09157e91c9c1fc11e05a82c9a2cd5dc54e8a Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Fri, 24 Oct 2025 16:29:21 -0600 Subject: [PATCH] New approach to installing nextest? --- .github/workflows/ci.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06883a88506532765eb7572e2da9e4dae18a7fc3..1ee114bb63186985b64c25beec8d8a23600b0bfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -299,7 +299,9 @@ jobs: - namespace-profile-ubuntu22-x86-16x32-custom steps: - name: Add Rust to the PATH - run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + run: | + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + echo "$HOME/.cargo-nextest/bin" >> "$GITHUB_PATH" - name: Checkout repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -310,7 +312,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: path: | - /home/runner/.cargo + /home/runner/.cargo-nextest /home/runner/.rustup ./target @@ -319,25 +321,25 @@ jobs: mkdir -p ./../.cargo cp ./.cargo/ci-config.toml ./../.cargo/config.toml - - name: cargo clippy - run: ./script/clippy + - name: Install cargo nextest + shell: bash -euxo pipefail {0} + run: | + cargo install cargo-nextest --locked --root ~/.cargo-nextest + + - name: Limit target directory size + env: + MAX_SIZE: ${{ runner.os == 'macOS' && 300 || 100 }} + shell: bash -euxo pipefail {0} + # Use the variable in the run command + run: script/clear-target-dir-if-larger-than ${{ env.MAX_SIZE }} - name: Run tests - uses: ./.github/actions/run_tests + shell: bash -euxo pipefail {0} + run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final - name: Build other binaries and features run: | cargo build -p zed - cargo check -p workspace - cargo check -p gpui --examples - - # Even the Linux runner is not stateful, in theory there is no need to do this cleanup. - # But, to avoid potential issues in the future if we choose to use a stateful Linux runner and forget to add code - # to clean up the config file, I’ve included the cleanup code here as a precaution. - # While it’s not strictly necessary at this moment, I believe it’s better to err on the side of caution. - - name: Clean CI config file - if: always() - run: rm -rf ./../.cargo doctests: # Nextest currently doesn't support doctests, so run them separately and in parallel.