This is an automated email from the ASF dual-hosted git repository.

tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-drools.git


The following commit(s) were added to refs/heads/main by this push:
     new d585b4999d NO-ISSUE: Temporary JBang installation with checksum 
verification in CI workflows (#6701)
d585b4999d is described below

commit d585b4999d68c4e641558f5b2dac069e7a49711e
Author: Tiago Bento <[email protected]>
AuthorDate: Wed May 13 09:13:00 2026 -0400

    NO-ISSUE: Temporary JBang installation with checksum verification in CI 
workflows (#6701)
---
 .github/workflows/ci-tests.yaml                            | 13 ++++++++++---
 .github/workflows/ci.yaml                                  | 14 ++++++++++++--
 .gitignore                                                 |  2 ++
 .rat-excludes                                              |  6 +++---
 script/ci/CiSummary.java                                   |  6 +++++-
 script/ci/tests/CiSummaryTest.java                         |  2 ++
 .../scenarios-summary/01-no-tests-no-scope/root/.gitkeep   |  0
 .../target/surefire-reports/TS-com.example.FooTest.xml     |  5 +++++
 .../a1/target/surefire-reports/TS-com.example.A1Test.xml   |  7 +++++++
 .../u/target/surefire-reports/TS-com.example.UTest.xml     |  4 ++++
 10 files changed, 50 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml
index 667071d633..0abd3e2600 100644
--- a/.github/workflows/ci-tests.yaml
+++ b/.github/workflows/ci-tests.yaml
@@ -53,9 +53,16 @@ jobs:
           java-version: 21
           distribution: temurin
           cache: maven
-
-      - uses: jbangdev/setup-jbang@2b1b465a7b75f4222b81426f23a01e013aa7b95c
-        name: 'SETUP :: Install JBang'
+ 
+      # Temporary workaround while jbangdev/setup-jbang action doesn't include 
checksum verification.
+      # See https://github.com/apache/infrastructure-actions/pull/806
+      - name: 'SETUP :: Install JBang'
+        shell: bash
+        run: |
+          curl -sL 
https://github.com/jbangdev/jbang/releases/download/v0.138.0/jbang-0.138.0.zip 
-o jbang.zip
+          echo 
"3c9fb9ac5823ae5ab9d136dec08b896e2a0f6f6b313689b21f43c511b7c34b85  jbang.zip" | 
sha256sum -c -
+          unzip -q jbang.zip
+          echo "${{ github.workspace }}/jbang-0.138.0/bin" >> $GITHUB_PATH
 
       - name: 'SETUP :: Block apache.snapshots Maven repository'
         shell: bash
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index d9f137b194..cbf05f7459 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -41,6 +41,9 @@ jobs:
       matrix:
         os:   [ubuntu-latest, macos-latest, windows-latest]
         java: [17, 21]
+        exclude:
+          - os: windows-latest
+            java: 17
 
     steps:
       - name: 'SETUP :: Set paths for temporary files'
@@ -79,8 +82,15 @@ jobs:
           distribution: temurin
           cache: maven
 
-      - uses: jbangdev/setup-jbang@2b1b465a7b75f4222b81426f23a01e013aa7b95c
-        name: 'SETUP :: Install JBang'
+      # Temporary workaround while jbangdev/setup-jbang action doesn't include 
checksum verification.
+      # See https://github.com/apache/infrastructure-actions/pull/806
+      - name: 'SETUP :: Install JBang'
+        shell: bash
+        run: |
+          curl -sL 
https://github.com/jbangdev/jbang/releases/download/v0.138.0/jbang-0.138.0.zip 
-o jbang.zip
+          echo 
"3c9fb9ac5823ae5ab9d136dec08b896e2a0f6f6b313689b21f43c511b7c34b85  jbang.zip" | 
sha256sum -c -
+          unzip -q jbang.zip
+          echo "${{ github.workspace }}/jbang-0.138.0/bin" >> $GITHUB_PATH
 
       - name: 'SETUP :: Block apache.snapshots Maven repository'
         shell: bash
diff --git a/.gitignore b/.gitignore
index 21ec324f1e..6da22c7cc9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,11 +16,13 @@
 # under the License.
 
 target/
+!script/ci/tests/scenarios-summary/**/target/
 local/
 
 # Eclipse, Netbeans and IntelliJ files
 .*
 !.gitignore
+!script/ci/tests/scenarios-summary/**/.gitkeep
 !.github
 !.git-blame-ignore-revs
 !.openrewrite
diff --git a/.rat-excludes b/.rat-excludes
index 7281c089cd..78a1d1c92f 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -50,12 +50,12 @@ 
script/ci/tests/scenarios-summary/01-no-tests-no-scope/expected-summary.md
 script/ci/tests/scenarios-summary/01-no-tests-no-scope/root/.gitkeep
 script/ci/tests/scenarios-summary/02-full-build-all-pass/env.properties
 script/ci/tests/scenarios-summary/02-full-build-all-pass/expected-summary.md
-script/ci/tests/scenarios-summary/02-full-build-all-pass/root/module-a/target/surefire-reports/TEST-com.example.FooTest.xml
+script/ci/tests/scenarios-summary/02-full-build-all-pass/root/module-a/target/surefire-reports/TS-com.example.FooTest.xml
 script/ci/tests/scenarios-summary/03-pr-with-failures/env.properties
 script/ci/tests/scenarios-summary/03-pr-with-failures/expected-summary.md
 script/ci/tests/scenarios-summary/03-pr-with-failures/graph.tsv
-script/ci/tests/scenarios-summary/03-pr-with-failures/root/a1/target/surefire-reports/TEST-com.example.A1Test.xml
-script/ci/tests/scenarios-summary/03-pr-with-failures/root/u/target/surefire-reports/TEST-com.example.UTest.xml
+script/ci/tests/scenarios-summary/03-pr-with-failures/root/a1/target/surefire-reports/TS-com.example.A1Test.xml
+script/ci/tests/scenarios-summary/03-pr-with-failures/root/u/target/surefire-reports/TS-com.example.UTest.xml
 .rat-reports
 DISCLAIMER-WIP
 drools-core/src/test/resources/manners128.dat
diff --git a/script/ci/CiSummary.java b/script/ci/CiSummary.java
index 779e4fd167..c6ca1cdcec 100644
--- a/script/ci/CiSummary.java
+++ b/script/ci/CiSummary.java
@@ -45,6 +45,8 @@ import java.util.stream.*;
  *   DEP_GRAPH_EXTRACTOR__OUTPUT_FILE TSV dump produced by the 
dep-graph-extractor Maven extension via CiComputeBuildScopes.
  *                                    Lines: `P<TAB>ga<TAB>abs-basedir` (one 
per reactor project)
  *                                           
`D<TAB>dependent-ga<TAB>dependency-ga` (one per direct edge)
+ *   CI_SUREFIRE_FILE_PREFIXES        Comma-separated list of filename 
prefixes accepted as test report XMLs.
+ *                                    Default: `TEST-,IT-`
  */
 class CiSummary {
 
@@ -171,6 +173,8 @@ class CiSummary {
         mermaidExpanded = "true".equalsIgnoreCase(env("MERMAID_EXPANDED", 
"false"));
         matrixOs        = env("MATRIX_OS",   "");
         matrixJava      = env("MATRIX_JAVA", "");
+        var surefixPrefixesCsv = env("CI_SUREFIRE_FILE_PREFIXES", "TEST-,IT-");
+        var surefirePrefixes = List.of(surefixPrefixesCsv.split(","));
 
         if (graphPath != null) {
             try {
@@ -191,7 +195,7 @@ class CiSummary {
                 var name = p.getFileName().toString();
                 var dir  = p.getParent() == null ? "" : 
p.getParent().getFileName().toString();
                 return name.endsWith(".xml")
-                    && (name.startsWith("TEST-") || name.startsWith("IT-"))
+                    && surefirePrefixes.stream().anyMatch(name::startsWith)
                     && (dir.equals("surefire-reports") || 
dir.equals("failsafe-reports"));
             }).forEach(xmlFiles::add);
         }
diff --git a/script/ci/tests/CiSummaryTest.java 
b/script/ci/tests/CiSummaryTest.java
index b5a2b0aab6..b4abed51c9 100644
--- a/script/ci/tests/CiSummaryTest.java
+++ b/script/ci/tests/CiSummaryTest.java
@@ -126,6 +126,8 @@ public class CiSummaryTest {
         extraEnv.put("CI_REPO_ROOT", root.toAbsolutePath().toString());
         // Unset so CiSummary writes to stdout rather than a summary file.
         extraEnv.put("GITHUB_STEP_SUMMARY", null);
+        // Fixture XMLs use TS- prefix to avoid matching 
action-surefire-report's TEST-*.xml glob.
+        extraEnv.put("CI_SUREFIRE_FILE_PREFIXES", "TS-");
 
         Path envProps = scenario.resolve("env.properties");
         if (Files.isRegularFile(envProps)) {
diff --git 
a/script/ci/tests/scenarios-summary/01-no-tests-no-scope/root/.gitkeep 
b/script/ci/tests/scenarios-summary/01-no-tests-no-scope/root/.gitkeep
new file mode 100644
index 0000000000..e69de29bb2
diff --git 
a/script/ci/tests/scenarios-summary/02-full-build-all-pass/root/module-a/target/surefire-reports/TS-com.example.FooTest.xml
 
b/script/ci/tests/scenarios-summary/02-full-build-all-pass/root/module-a/target/surefire-reports/TS-com.example.FooTest.xml
new file mode 100644
index 0000000000..b066349ffc
--- /dev/null
+++ 
b/script/ci/tests/scenarios-summary/02-full-build-all-pass/root/module-a/target/surefire-reports/TS-com.example.FooTest.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<testsuite name="com.example.FooTest" tests="2" failures="0" errors="0" 
skipped="0" time="0.1">
+  <testcase name="testOne" classname="com.example.FooTest" time="0.05"/>
+  <testcase name="testTwo" classname="com.example.FooTest" time="0.05"/>
+</testsuite>
diff --git 
a/script/ci/tests/scenarios-summary/03-pr-with-failures/root/a1/target/surefire-reports/TS-com.example.A1Test.xml
 
b/script/ci/tests/scenarios-summary/03-pr-with-failures/root/a1/target/surefire-reports/TS-com.example.A1Test.xml
new file mode 100644
index 0000000000..bc819798b4
--- /dev/null
+++ 
b/script/ci/tests/scenarios-summary/03-pr-with-failures/root/a1/target/surefire-reports/TS-com.example.A1Test.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<testsuite name="com.example.A1Test" tests="2" failures="1" errors="0" 
skipped="0" time="0.2">
+  <testcase name="testPasses" classname="com.example.A1Test" time="0.05"/>
+  <testcase name="testFails" classname="com.example.A1Test" time="0.15">
+    <failure type="java.lang.AssertionError" message="expected [true] but was 
[false]">at com.example.A1Test.testFails(A1Test.java:42)</failure>
+  </testcase>
+</testsuite>
diff --git 
a/script/ci/tests/scenarios-summary/03-pr-with-failures/root/u/target/surefire-reports/TS-com.example.UTest.xml
 
b/script/ci/tests/scenarios-summary/03-pr-with-failures/root/u/target/surefire-reports/TS-com.example.UTest.xml
new file mode 100644
index 0000000000..a48651a9ef
--- /dev/null
+++ 
b/script/ci/tests/scenarios-summary/03-pr-with-failures/root/u/target/surefire-reports/TS-com.example.UTest.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<testsuite name="com.example.UTest" tests="1" failures="0" errors="0" 
skipped="0" time="0.1">
+  <testcase name="testUp" classname="com.example.UTest" time="0.05"/>
+</testsuite>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to