This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch reusable_workflows
in repository https://gitbox.apache.org/repos/asf/datasketches-java.git
The following commit(s) were added to refs/heads/reusable_workflows by this
push:
new 428323080 Run the matrix tests from the jars
428323080 is described below
commit 42832308052840fe15e49a5ee43d598fd3937667
Author: Lee Rhodes <[email protected]>
AuthorDate: Tue Nov 3 15:19:18 2026 -0800
Run the matrix tests from the jars
The step passed -Dmaven.test.classpath.useTestJar=true, which is not a
surefire parameter, so surefire ignored it, found no test classes and
reported "Tests run: 0, BUILD SUCCESS". Put the main and test jars on the
test classpath instead, and fail the job if no tests run.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.github/workflows/reusable-jdk-os-matrix.yml | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/reusable-jdk-os-matrix.yml
b/.github/workflows/reusable-jdk-os-matrix.yml
index 2acfa9b98..143fcecbd 100644
--- a/.github/workflows/reusable-jdk-os-matrix.yml
+++ b/.github/workflows/reusable-jdk-os-matrix.yml
@@ -74,8 +74,15 @@ jobs:
JAVA_EXE="$JAVA_HOME/bin/java"
fi
echo "Testing datasketches-java jars for JDK version ${{
inputs.jdk_version }}..."
+ # Surefire needs these directories to exist, but the classes come
from the jars.
+ mkdir -p target/classes target/test-classes
+ MAIN_JAR=$(ls target/datasketches-java-*.jar | grep -v -E -e
'-(tests|sources|test-sources|javadoc)\.jar$')
+ TEST_JAR=$(ls target/datasketches-java-*-tests.jar)
+ echo "Main jar: $MAIN_JAR"
+ echo "Test jar: $TEST_JAR"
mvn surefire:test -B \
- -Dmaven.test.classpath.useTestJar=true \
+ -Dmaven.test.additionalClasspath="$MAIN_JAR,$TEST_JAR" \
+ -DfailIfNoTests=true \
-Djvm="$JAVA_EXE" \
-DargLine="${{ env.JVM_ARGS }}"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]