This is an automated email from the ASF dual-hosted git repository.
hgruszecki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git
The following commit(s) were added to refs/heads/master by this push:
new 01803cc0a ci: partition Rust tests across 2 parallel CI machines
(#3003)
01803cc0a is described below
commit 01803cc0a57fc22300bdd8f45ffaf32a63aa10ec
Author: Hubert Gruszecki <[email protected]>
AuthorDate: Sat Mar 21 10:51:32 2026 +0100
ci: partition Rust tests across 2 parallel CI machines (#3003)
---
.github/actions/rust/pre-merge/action.yml | 21 +++++++++++++++------
.github/config/components.yml | 3 ++-
.github/workflows/_test.yml | 2 +-
3 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/.github/actions/rust/pre-merge/action.yml
b/.github/actions/rust/pre-merge/action.yml
index a47702cdf..4edcd1f91 100644
--- a/.github/actions/rust/pre-merge/action.yml
+++ b/.github/actions/rust/pre-merge/action.yml
@@ -20,7 +20,7 @@ description: Rust pre-merge testing and linting github iggy
actions
inputs:
task:
- description: "Task to run (check, fmt, clippy, sort, machete, doctest,
test, compat)"
+ description: "Task to run (check, fmt, clippy, sort, machete, doctest,
test-1, test-2, compat)"
required: true
component:
description: "Component name (for context)"
@@ -45,7 +45,7 @@ runs:
- name: Setup Rust with cache
uses: ./.github/actions/utils/setup-rust-with-cache
with:
- print-cache-status: ${{ inputs.task == 'test' }}
+ print-cache-status: ${{ startsWith(inputs.task, 'test-') }}
- name: Install tools for specific tasks
run: |
@@ -93,21 +93,30 @@ runs:
shell: bash
- name: Install dependencies for Rust tests
- if: inputs.task == 'test' && runner.os == 'Linux'
+ if: startsWith(inputs.task, 'test-') && runner.os == 'Linux'
run: |
sudo apt-get update --yes && sudo apt-get install --yes musl-tools
gnome-keyring keyutils dbus-x11 libsecret-tools
rm -f $HOME/.local/share/keyrings/*
shell: bash
- name: Install cargo-llvm-cov
- if: inputs.task == 'test'
+ if: startsWith(inputs.task, 'test-')
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Build and test with coverage
- if: inputs.task == 'test'
+ if: startsWith(inputs.task, 'test-')
run: |
+ # Parse partition index from task name (test-1 -> hash:1/2, test-2 ->
hash:2/2)
+ TASK="${{ inputs.task }}"
+ PARTITION_FLAG=""
+ if [[ "$TASK" =~ ^test-([0-9]+)$ ]]; then
+ PARTITION_INDEX="${BASH_REMATCH[1]}"
+ PARTITION_FLAG="--partition hash:${PARTITION_INDEX}/2"
+ echo "::notice::Running test partition ${PARTITION_INDEX}/2"
+ fi
+
source <(cargo llvm-cov show-env --export-prefix)
bins_start=$(date +%s)
@@ -135,7 +144,7 @@ runs:
test_start=$(date +%s)
if command -v cargo-nextest &> /dev/null; then
- cargo nextest run --locked --no-fail-fast
+ cargo nextest run --locked --no-fail-fast $PARTITION_FLAG
else
cargo test --locked --no-fail-fast
fi
diff --git a/.github/config/components.yml b/.github/config/components.yml
index 93bdca5ef..29079bd8f 100644
--- a/.github/config/components.yml
+++ b/.github/config/components.yml
@@ -109,7 +109,8 @@ components:
- "sort"
- "doctest"
- "machete"
- - "test"
+ - "test-1"
+ - "test-2"
- "compat"
- "build-aarch64-gnu"
- "build-aarch64-musl"
diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml
index bcb37321c..6fd50003e 100644
--- a/.github/workflows/_test.yml
+++ b/.github/workflows/_test.yml
@@ -63,7 +63,7 @@ jobs:
component: ${{ inputs.component }}
- name: Upload coverage to Codecov
- if: startsWith(inputs.component, 'rust') && inputs.task == 'test'
+ if: startsWith(inputs.component, 'rust') && startsWith(inputs.task,
'test-')
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}