You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/05/31 10:43:59 UTC

[camel] branch main updated: component-test - simplify error message

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

nfilotto pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 0287c527b27 component-test - simplify error message
0287c527b27 is described below

commit 0287c527b27b10e7e82a66c43133b9826b14207b
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Wed May 31 12:43:32 2023 +0200

    component-test - simplify error message
---
 .github/actions/component-test/action.yaml       | 33 +++---------------------
 .github/actions/component-test/component-test.sh |  4 +--
 2 files changed, 5 insertions(+), 32 deletions(-)

diff --git a/.github/actions/component-test/action.yaml b/.github/actions/component-test/action.yaml
index 1a306d5ee90..2d7737a038c 100644
--- a/.github/actions/component-test/action.yaml
+++ b/.github/actions/component-test/action.yaml
@@ -77,39 +77,12 @@ runs:
       with:
         github-token: ${{ inputs.github-token }}
         script: |
-          var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
-             owner: context.repo.owner,
-             repo: context.repo.repo,
-             run_id: ${{ inputs.run-id }}
-          });
-          console.log("########")
-          console.log(artifacts)
-          console.log(artifacts.data)
-          console.log(artifacts.data.artifacts)
-          for (int i = 0; i < 30 && artifacts.data.artifacts.length == 0; i++) {
-            console.log("No artifacts yet, let's try again")
-            await setTimeout(1000);
-            artifacts = await github.rest.actions.listWorkflowRunArtifacts({
-               owner: context.repo.owner,
-               repo: context.repo.repo,
-               run_id: ${{ inputs.run-id }}
-            });
-            console.log("########")
-            console.log(artifacts)
-            console.log(artifacts.data)
-            console.log(artifacts.data.artifacts)
-          }
-          **Result** :x: The tests failed please check the logs below:
-
-          `
-          for (const artifact in artifacts.data.artifacts) {
-            message += `* [*${artifact.name}*](${artifact.url})
-          `
-          }
           await github.rest.issues.updateComment({
                 owner: context.repo.owner,
                 repo: context.repo.repo,
                 issue_number: ${{ inputs.pr-id }},
                 comment_id: ${{ inputs.comment-id }},
-                body: message
+                body: `${{ inputs.comment-body }}
+
+          **Result** :x: The tests failed please [check the logs](https://github.com/apache/camel/actions/runs/${{ inputs.run-id }})`
           });
diff --git a/.github/actions/component-test/component-test.sh b/.github/actions/component-test/component-test.sh
index 39c41e80a96..eb79f13ca4f 100755
--- a/.github/actions/component-test/component-test.sh
+++ b/.github/actions/component-test/component-test.sh
@@ -45,10 +45,10 @@ function main() {
 
   if [[ ${fastBuild} = "true" ]] ; then
     echo "Launching a fast build against the projects ${pl} and their dependencies"
-    $mavenBinary -l $log -Pfastinstall installo -pl "$pl" -am
+    $mavenBinary -l $log -Pfastinstall install -pl "$pl" -am
   else
     echo "Launching tests of the projects ${pl}"
-    $mavenBinary -l $log installo -pl "$pl"
+    $mavenBinary -l $log install -pl "$pl"
   fi
 }