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

kgyrtkirk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new e4083a2efc3 Fix jacoco checks (#17729)
e4083a2efc3 is described below

commit e4083a2efc39af776cf200da065707fbeb056136
Author: Zoltan Haindrich <[email protected]>
AuthorDate: Mon Feb 17 12:46:19 2025 +0100

    Fix jacoco checks (#17729)
---
 .github/scripts/create-jacoco-coverage-report.sh         |  3 ++-
 .github/scripts/run-unit-tests.sh                        |  4 ++--
 .github/workflows/ci.yml                                 |  1 +
 .github/workflows/unit-and-integration-tests-unified.yml |  7 +++++++
 .github/workflows/worker.yml                             | 10 +++++-----
 5 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/.github/scripts/create-jacoco-coverage-report.sh 
b/.github/scripts/create-jacoco-coverage-report.sh
index 608fb7fdb09..97f18bebeb6 100755
--- a/.github/scripts/create-jacoco-coverage-report.sh
+++ b/.github/scripts/create-jacoco-coverage-report.sh
@@ -32,7 +32,7 @@ mvn jacoco:merge
 
 mvn jacoco:report
 
-changed_files="$(git diff --name-only origin/${GITHUB_BASE_REF}...HEAD | grep 
"\.java$" || [[ $? == 1 ]])"
+changed_files="$(git diff --name-only origin/${GITHUB_BASE_REF}...HEAD 
'**/*.java' || [[ $? == 1 ]])"
 
 echo "Changed files:"
 for f in ${changed_files}
@@ -48,6 +48,7 @@ export FORCE_COLOR=2
 
 if [ -n "${changed_files}" ]
 then
+  find . -name jacoco.xml | grep . >/dev/null || { echo 'No jacoco.xml found; 
something must be broken!'; exit 1; }
   git diff origin/${GITHUB_BASE_REF}...HEAD -- ${changed_files} |
   node_modules/.bin/diff-test-coverage \
   --coverage "**/target/site/jacoco/jacoco.xml" \
diff --git a/.github/scripts/run-unit-tests.sh 
b/.github/scripts/run-unit-tests.sh
index 4510e0525bb..91bdbfcbbc0 100755
--- a/.github/scripts/run-unit-tests.sh
+++ b/.github/scripts/run-unit-tests.sh
@@ -19,7 +19,7 @@ set -e
 set -x
 
 OPTS+="-pl 
!integration-tests,!:druid-it-tools,!:druid-it-image,!:druid-it-cases"
-OPTS+=" -Dsurefire.failIfNoSpecifiedTests=false -P skip-static-checks 
-Dweb.console.skip=true -Dmaven.javadoc.skip=true"
-OPTS+=" -Djacoco.destFile=\"target/jacoco-${HASH}.exec\""
+OPTS+=" -Dsurefire.failIfNoSpecifiedTests=false -P skip-static-checks 
-Dweb.console.skip=true"
+OPTS+=" -Djacoco.destFile=target/jacoco-${HASH}.exec"
 
 mvn -B $OPTS test "$@"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 76288f6d576..191b53ac2fb 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -64,6 +64,7 @@ jobs:
     name: "report-jacoco-coverage-failures"
     needs: run-unit-tests
     uses: ./.github/workflows/worker.yml
+    if: ${{ !contains( github.event.pull_request.labels.*.name, 'jacoco:skip') 
}}
     with:
       script: .github/scripts/create-jacoco-coverage-report.sh
       artifacts_to_download: "unit-test-reports-*"
diff --git a/.github/workflows/unit-and-integration-tests-unified.yml 
b/.github/workflows/unit-and-integration-tests-unified.yml
index 63a06869baf..1a5fdddff63 100644
--- a/.github/workflows/unit-and-integration-tests-unified.yml
+++ b/.github/workflows/unit-and-integration-tests-unified.yml
@@ -220,3 +220,10 @@ jobs:
       DRUID_PREVIOUS_VERSION: ${{ 
needs.set-env-var.outputs.DRUID_PREVIOUS_VERSION }}
       DRUID_PREVIOUS_VERSION_DOWNLOAD_URL: ${{ 
needs.set-env-var.outputs.DRUID_PREVIOUS_VERSION_DOWNLOAD_URL }}
       DRUID_PREVIOUS_IT_IMAGE_NAME: ${{ 
needs.set-env-var.outputs.DRUID_PREVIOUS_IT_IMAGE_NAME }}
+
+  actions-timeline:
+    needs: [build, unit-tests-approved, unit-tests-unapproved, revised-its, 
standard-its]
+    runs-on: ubuntu-latest
+    if: ${{ always() }}
+    steps:
+      - uses: Kesin11/actions-timeline@427ee2cf860166e404d0d69b4f2b24012bb7af4f
diff --git a/.github/workflows/worker.yml b/.github/workflows/worker.yml
index e890637d147..d25cf0cdba0 100644
--- a/.github/workflows/worker.yml
+++ b/.github/workflows/worker.yml
@@ -66,10 +66,10 @@ jobs:
           merge-multiple: true
 
       - name: Calculate hash for artifact name
-        run: echo "HASH=$(echo -n "${{ inputs.key }}" | sha256sum | cut -d' ' 
-f1 | cut -c1-8)" >> $GITHUB_ENV
+        run: echo "HASH=$(echo -n "${{ inputs.key }}" | sha256sum | cut -c-8)" 
>> $GITHUB_ENV
 
-      - name: 'Execute script: (${{ inputs.key }})'
-        run: ./${{ inputs.script }}
+      - name: 'Execute: ${{ inputs.script }}'
+        run: ${{ inputs.script }}
 
       - name: Upload artifact
         uses: actions/upload-artifact@v4
@@ -81,5 +81,5 @@ jobs:
             **/hs_err_pid*
             **/replay_pid*
             **/core.[0-9]*
-            ./**/TEST-*.xml
-            ./**/target/jacoco*.exec
+            **/TEST-*.xml
+            **/target/jacoco*.exec


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

Reply via email to