From be07ee1650b2ae80180fac19a53f4ce70eb75e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Heres?= Date: Tue, 26 May 2026 21:23:40 +0200 Subject: [PATCH] Use nextest for CI test jobs --- .github/workflows/extended.yml | 22 ++++++++++------ .github/workflows/rust.yml | 46 ++++++++++++++++++++++++++-------- 2 files changed, 51 insertions(+), 17 deletions(-) diff --git a/.github/workflows/extended.yml b/.github/workflows/extended.yml index a143cb49fd35b..e48b17bcfb3e7 100644 --- a/.github/workflows/extended.yml +++ b/.github/workflows/extended.yml @@ -59,7 +59,7 @@ permissions: jobs: # Run extended tests (with feature 'extended_tests') linux-test-extended: - name: cargo test 'extended_tests' (amd64) + name: cargo nextest 'extended_tests' (amd64) runs-on: ${{ vars.USE_RUNS_ON == 'true' && format('runs-on={0},family=m8a+m7a+c8a,cpu=32,image=ubuntu24-full-x64,extras=s3-cache,disk=large,tag=datafusion', github.run_id) || 'ubuntu-latest' }} # note: do not use amd/rust container to preserve disk space steps: @@ -80,16 +80,20 @@ jobs: run: | sudo apt-get update sudo apt-get install -y protobuf-compiler + - name: Install nextest + uses: taiki-e/install-action@213ccc1a076163c093f914550b94feb90fab916d # v2.79.2 + with: + tool: nextest # For debugging, test binaries can be large. - name: Show available disk space run: | df -h - - name: Run tests (excluding doctests) + - name: Run tests with nextest (excluding doctests) env: RUST_BACKTRACE: 1 run: | - cargo test \ - --profile ci \ + cargo nextest run \ + --cargo-profile ci \ --exclude datafusion-examples \ --exclude datafusion-benchmarks \ --exclude datafusion-cli \ @@ -105,7 +109,7 @@ jobs: # Check answers are correct when hash values collide hash-collisions: - name: cargo test hash collisions (amd64) + name: cargo nextest hash collisions (amd64) runs-on: ${{ vars.USE_RUNS_ON == 'true' && format('runs-on={0},family=m8a+m7a+c8a,cpu=16,image=ubuntu24-full-x64,extras=s3-cache,disk=large,tag=datafusion', github.run_id) || 'ubuntu-latest' }} container: image: amd64/rust @@ -120,10 +124,14 @@ jobs: uses: ./.github/actions/setup-builder with: rust-version: stable + - name: Install nextest + uses: taiki-e/install-action@213ccc1a076163c093f914550b94feb90fab916d # v2.79.2 + with: + tool: nextest - name: Run tests run: | cd datafusion - cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-sqllogictest --exclude datafusion-cli --workspace --lib --tests --features=force_hash_collisions,avro + cargo nextest run --cargo-profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-sqllogictest --exclude datafusion-cli --workspace --lib --tests --features=force_hash_collisions,avro cargo clean sqllogictest-sqlite: @@ -144,4 +152,4 @@ jobs: apt-get update && apt-get install -y protobuf-compiler - name: Run sqllogictest run: | - cargo test --features backtrace,parquet_encryption --profile ci-optimized --test sqllogictests -- --include-sqlite \ No newline at end of file + cargo test --features backtrace,parquet_encryption --profile ci-optimized --test sqllogictests -- --include-sqlite diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bb2075ee018c3..73b5cfe826647 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -268,7 +268,7 @@ jobs: # Library and integration tests linux-test: - name: cargo test (amd64) + name: cargo nextest (amd64) needs: linux-build-lib runs-on: ${{ vars.USE_RUNS_ON == 'true' && format('runs-on={0},family=m8a+m7a+c8a,cpu=16,image=ubuntu24-full-x64,extras=s3-cache,disk=large,tag=datafusion', github.run_id) || 'ubuntu-latest' }} container: @@ -290,12 +290,16 @@ jobs: with: save-if: ${{ github.ref_name == 'main' }} shared-key: "amd-ci" - - name: Run tests (excluding doctests and datafusion-cli) + - name: Install nextest + uses: taiki-e/install-action@213ccc1a076163c093f914550b94feb90fab916d # v2.79.2 + with: + tool: nextest + - name: Run tests with nextest (excluding doctests and datafusion-cli) env: RUST_BACKTRACE: 1 run: | - cargo test \ - --profile ci \ + cargo nextest run \ + --cargo-profile ci \ --exclude datafusion-examples \ --exclude ffi_example_table_provider \ --exclude datafusion-cli \ @@ -304,6 +308,16 @@ jobs: --tests \ --bins \ --features serde,avro,json,backtrace,integration-tests,parquet_encryption,substrait + - name: Run sqllogictests + env: + RUST_BACKTRACE: 1 + run: | + # cargo-nextest lists this custom harness but does not execute it. + cargo test \ + --profile ci \ + --package datafusion-sqllogictest \ + --test sqllogictests \ + --features backtrace,parquet_encryption,substrait - name: Verify Working Directory Clean run: git diff --exit-code # Check no temporary directories created during test. @@ -318,7 +332,7 @@ jobs: # datafusion-cli tests linux-test-datafusion-cli: - name: cargo test datafusion-cli (amd64) + name: cargo nextest datafusion-cli (amd64) needs: linux-build-lib runs-on: ${{ vars.USE_RUNS_ON == 'true' && format('runs-on={0},family=m8a+m7a+c8a,cpu=16,image=ubuntu24-full-x64,extras=s3-cache,disk=large,tag=datafusion', github.run_id) || 'ubuntu-latest' }} steps: @@ -334,7 +348,11 @@ jobs: with: save-if: false # set in linux-test shared-key: "amd-ci" - - name: Run tests (excluding doctests) + - name: Install nextest + uses: taiki-e/install-action@213ccc1a076163c093f914550b94feb90fab916d # v2.79.2 + with: + tool: nextest + - name: Run tests with nextest (excluding doctests) env: RUST_BACKTRACE: 1 AWS_ENDPOINT: http://127.0.0.1:9000 @@ -342,7 +360,7 @@ jobs: AWS_SECRET_ACCESS_KEY: TEST-DataFusionPassword TEST_STORAGE_INTEGRATION: 1 AWS_ALLOW_HTTP: true - run: cargo test --features backtrace --profile ci -p datafusion-cli --lib --tests --bins + run: cargo nextest run --features backtrace --cargo-profile ci -p datafusion-cli --lib --tests --bins - name: Verify Working Directory Clean run: git diff --exit-code @@ -457,6 +475,10 @@ jobs: uses: ./.github/actions/setup-builder with: rust-version: stable + - name: Install nextest + uses: taiki-e/install-action@213ccc1a076163c093f914550b94feb90fab916d # v2.79.2 + with: + tool: nextest - name: Generate benchmark data and expected query results run: | mkdir -p datafusion/sqllogictest/test_files/tpch/data @@ -470,7 +492,7 @@ jobs: # increase stack size to fix stack overflow export RUST_MIN_STACK=20971520 export TPCH_DATA=`realpath datafusion/sqllogictest/test_files/tpch/data` - cargo test plan_q --package datafusion-benchmarks --profile ci --features=ci -- --test-threads=1 + cargo nextest run --package datafusion-benchmarks --cargo-profile ci --features=ci --test-threads=1 plan_q INCLUDE_TPCH=true cargo test --features backtrace,parquet_encryption,substrait --profile ci --package datafusion-sqllogictest --test sqllogictests - name: Verify Working Directory Clean run: git diff --exit-code @@ -562,7 +584,7 @@ jobs: # historically came from datafusion-benchmarks (now covered on amd64) or # flaky sqllogictest metrics. macos-aarch64: - name: cargo test (macos-aarch64) + name: cargo nextest (macos-aarch64) runs-on: macos-15 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -571,9 +593,13 @@ jobs: fetch-depth: 1 - name: Setup Rust toolchain uses: ./.github/actions/setup-macos-aarch64-builder + - name: Install nextest + uses: taiki-e/install-action@213ccc1a076163c093f914550b94feb90fab916d # v2.79.2 + with: + tool: nextest - name: Run datafusion-ffi tests shell: bash - run: cargo test --profile ci -p datafusion-ffi --lib --tests --features integration-tests + run: cargo nextest run --cargo-profile ci -p datafusion-ffi --lib --tests --features integration-tests vendor: name: Verify Vendored Code