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 08845bf36 ci: split examples-suite into per-SDK example components
(#2899)
08845bf36 is described below
commit 08845bf36bdeee99fad3d544bd3d9b7613924b8e
Author: Hubert Gruszecki <[email protected]>
AuthorDate: Tue Mar 10 10:00:05 2026 +0100
ci: split examples-suite into per-SDK example components (#2899)
---
.github/config/components.yml | 101 +++++++++++++++++++++--------------
.github/workflows/_detect.yml | 5 +-
.github/workflows/_test_examples.yml | 30 +++++------
3 files changed, 78 insertions(+), 58 deletions(-)
diff --git a/.github/config/components.yml b/.github/config/components.yml
index 1bd9717c1..fb2ccc11b 100644
--- a/.github/config/components.yml
+++ b/.github/config/components.yml
@@ -58,52 +58,34 @@ components:
paths:
- "core/binary_protocol/**"
- rust-clock:
- depends_on:
- - "rust-workspace"
- paths:
- - "core/clock/**"
-
- rust-journal:
- depends_on:
- - "rust-workspace"
- paths:
- - "core/journal/**"
-
- rust-partitions:
- depends_on:
- - "rust-workspace"
- paths:
- - "core/partitions/**"
-
rust-server:
depends_on:
- "rust-workspace"
- "rust-configs"
- "rust-common"
- "rust-binary-protocol"
- - "rust-journal"
- - "rust-partitions"
+ - "rust-cluster"
paths:
- "core/server/**"
rust-cluster:
depends_on:
- "rust-workspace"
- - "rust-clock"
paths:
+ - "core/clock/**"
- "core/consensus/**"
+ - "core/journal/**"
+ - "core/shard/**"
- "core/metadata/**"
- "core/message_bus/**"
+ - "core/partitions/**"
+ - "core/simulator/**"
# Main Rust workspace testing
rust:
depends_on:
- "rust-workspace"
- "rust-configs"
- - "rust-clock"
- - "rust-journal"
- - "rust-partitions"
- "rust-sdk"
- "rust-common"
- "rust-binary-protocol"
@@ -174,6 +156,7 @@ components:
- "rust-configs"
paths:
- "core/integration/**"
+ - "core/harness_derive/**"
sdk-python:
depends_on:
@@ -299,32 +282,70 @@ components:
- "bdd/scenarios/**"
tasks: ["bdd-java"]
- examples-suite:
+ examples-rust:
depends_on:
- "rust-sdk"
- "rust-server"
- - "sdk-go"
- - "sdk-csharp"
- - "sdk-python"
- - "sdk-java"
- - "ci-infrastructure" # CI changes trigger full regression
+ - "ci-infrastructure"
paths:
- - "examples/**"
+ - "examples/rust/**"
- "scripts/run-rust-examples-from-readme.sh"
+ tasks: ["examples-rust"]
+
+ examples-go:
+ depends_on:
+ - "rust-server"
+ - "rust-sdk" # All SDKs depend on core SDK changes
+ - "sdk-go"
+ - "ci-infrastructure"
+ paths:
+ - "examples/go/**"
- "scripts/run-go-examples-from-readme.sh"
+ tasks: ["examples-go"]
+
+ examples-csharp:
+ depends_on:
+ - "rust-server"
+ - "rust-sdk" # All SDKs depend on core SDK changes
+ - "sdk-csharp"
+ - "ci-infrastructure"
+ paths:
+ - "examples/csharp/**"
- "scripts/run-csharp-examples-from-readme.sh"
+ tasks: ["examples-csharp"]
+
+ examples-python:
+ depends_on:
+ - "rust-server"
+ - "rust-sdk" # All SDKs depend on core SDK changes
+ - "sdk-python"
+ - "ci-infrastructure"
+ paths:
+ - "examples/python/**"
- "scripts/run-python-examples-from-readme.sh"
+ tasks: ["examples-python"]
+
+ examples-node:
+ depends_on:
+ - "rust-server"
+ - "rust-sdk" # All SDKs depend on core SDK changes
+ - "sdk-node"
+ - "ci-infrastructure"
+ paths:
+ - "examples/node/**"
- "scripts/run-node-examples-from-readme.sh"
+ tasks: ["examples-node"]
+
+ examples-java:
+ depends_on:
+ - "rust-server"
+ - "rust-sdk" # All SDKs depend on core SDK changes
+ - "sdk-java"
+ - "ci-infrastructure"
+ paths:
+ - "examples/java/**"
- "scripts/run-java-examples-from-readme.sh"
- tasks:
- [
- "examples-rust",
- "examples-go",
- "examples-csharp",
- "examples-python",
- "examples-node",
- "examples-java",
- ]
+ tasks: ["examples-java"]
web-ui:
paths:
diff --git a/.github/workflows/_detect.yml b/.github/workflows/_detect.yml
index 15a358c51..e4f4fcdc7 100644
--- a/.github/workflows/_detect.yml
+++ b/.github/workflows/_detect.yml
@@ -259,8 +259,7 @@ jobs:
// Individual BDD tests should run separately with proper
Docker setup
groups.bdd.push(...entries);
}
- else if (name === 'examples-suite') {
- // Examples should run separately
+ else if (name.startsWith('examples-')) {
groups.examples.push(...entries);
}
else if (name === 'shell-scripts') groups.other.push(...entries);
@@ -317,7 +316,7 @@ jobs:
else if (name === 'sdk-csharp') groups.csharp.push(...entries);
else if (name === 'sdk-cpp') groups.cpp.push(...entries);
else if (name.startsWith('bdd-')) groups.bdd.push(...entries);
- else if (name === 'examples-suite')
groups.examples.push(...entries);
+ else if (name.startsWith('examples-'))
groups.examples.push(...entries);
else groups.other.push(...entries);
}
}
diff --git a/.github/workflows/_test_examples.yml
b/.github/workflows/_test_examples.yml
index 84b05164c..0e4efe365 100644
--- a/.github/workflows/_test_examples.yml
+++ b/.github/workflows/_test_examples.yml
@@ -22,7 +22,7 @@ on:
component:
type: string
required: true
- description: "Component to test (should be 'examples-suite')"
+ description: "Component to test (e.g., 'examples-rust', 'examples-go')"
task:
type: string
required: true
@@ -44,11 +44,11 @@ jobs:
run: echo "No changes detected, skipping tests"
- name: Setup Rust with cache for examples
- if: inputs.component == 'examples-suite'
+ if: startsWith(inputs.component, 'examples-')
uses: ./.github/actions/utils/setup-rust-with-cache
- name: Setup Node with cache for examples
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-node'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-node'
uses: ./.github/actions/utils/setup-node-with-cache
with:
node-version: "23"
@@ -56,36 +56,36 @@ jobs:
workspace: examples/node
- name: Setup Python
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-python'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-python'
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Setup uv
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-python'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-python'
uses: astral-sh/setup-uv@v7
- name: Cache uv
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-python'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-python'
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: uv-${{ runner.os }}-${{ hashFiles('examples/python/uv.lock',
'foreign/python/uv.lock', 'bdd/python/uv.lock') }}
- name: Setup Java with cache for examples
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-java'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-java'
uses: ./.github/actions/utils/setup-java-with-cache
with:
gradle-cache-disabled: "true"
- name: Setup Go for examples
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-go'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-go'
uses: ./.github/actions/utils/setup-go-with-cache
with:
download-deps: "false"
- name: Build common binaries for all examples
- if: inputs.component == 'examples-suite'
+ if: startsWith(inputs.component, 'examples-')
run: |
echo "Building common binaries for all examples tests..."
echo "Current directory: $(pwd)"
@@ -124,31 +124,31 @@ jobs:
fi
- name: Run Rust examples
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-rust'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-rust'
run: |
echo "Running Rust examples tests..."
./scripts/run-rust-examples-from-readme.sh
- name: Run Go examples
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-go'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-go'
run: |
echo "Running Go examples tests..."
./scripts/run-go-examples-from-readme.sh
- name: Run Csharp examples
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-csharp'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-csharp'
run: |
echo "Running Csharp examples tests..."
./scripts/run-csharp-examples-from-readme.sh
- name: Run Python examples
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-python'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-python'
run: |
echo "Running Python examples tests..."
./scripts/run-python-examples-from-readme.sh
- name: Run Node.js examples
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-node'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-node'
run: |
echo "Running Node.js examples tests..."
# Build the local Node SDK first (examples use file: link to it)
@@ -163,7 +163,7 @@ jobs:
./scripts/run-node-examples-from-readme.sh
- name: Run Java examples
- if: inputs.component == 'examples-suite' && inputs.task ==
'examples-java'
+ if: startsWith(inputs.component, 'examples-') && inputs.task ==
'examples-java'
run: |
echo "Running Java examples tests..."
./scripts/run-java-examples-from-readme.sh