This is an automated email from the ASF dual-hosted git repository.
liurenjie1024 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git
The following commit(s) were added to refs/heads/main by this push:
new 4c10b027e Use nextest to speedup tests (#2078)
4c10b027e is described below
commit 4c10b027e962aa99198ede75e710c89abd9f17c6
Author: Renjie Liu <[email protected]>
AuthorDate: Thu Jan 29 08:43:19 2026 +0800
Use nextest to speedup tests (#2078)
## Which issue does this PR close?
- Closes #2077.
## What changes are included in this PR?
Use nextest instead of cargo test to run tests.
## Are these changes tested?
Yes, ut.
---
.github/workflows/ci.yml | 16 +++++++++++++++-
Makefile | 8 +++++++-
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 829f64030..fe7476a80 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -146,12 +146,26 @@ jobs:
with:
key: ${{ matrix.test-suite.name }}
+ - name: Install cargo-nextest
+ if: matrix.test-suite.name == 'default'
+ uses: taiki-e/install-action@v2
+ with:
+ tool: cargo-nextest
+
- name: Start Docker containers
if: matrix.test-suite.name == 'default'
run: make docker-up
- name: Run tests
- run: cargo test --no-fail-fast ${{ matrix.test-suite.args }}
+ env:
+ # Disable debug info to speed up compilation and reduce artifact size
+ RUSTFLAGS: "-C debuginfo=0"
+ run: |
+ if [ "${{ matrix.test-suite.name }}" = "default" ]; then
+ cargo nextest run ${{ matrix.test-suite.args }}
+ else
+ cargo test --no-fail-fast ${{ matrix.test-suite.args }}
+ fi
- name: Stop Docker containers
if: always() && matrix.test-suite.name == 'default'
diff --git a/Makefile b/Makefile
index 14093e182..6579140ff 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,12 @@ install-cargo-machete:
cargo-machete: install-cargo-machete
cargo machete
+install-cargo-nextest:
+ cargo install --locked cargo-nextest
+
+nextest: install-cargo-nextest
+ cargo nextest run --all-targets --all-features --workspace
+
install-taplo-cli:
cargo install [email protected]
@@ -57,7 +63,7 @@ unit-test: doc-test
test: docker-up
@trap '$(MAKE) docker-down' EXIT; \
- cargo test --no-fail-fast --all-targets --all-features --workspace
+ $(MAKE) nextest
clean:
cargo clean