This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch camel-3.18.x in repository https://gitbox.apache.org/repos/asf/camel.git
commit 1eed52954c27d916a13f623369d1db79fe1a15ff Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Thu Oct 13 13:18:51 2022 +0200 (chores) ci: make the results easier to understand --- .github/actions/quick-test/quick-test.sh | 6 +++++- .github/workflows/component-pr.yaml | 15 ++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/actions/quick-test/quick-test.sh b/.github/actions/quick-test/quick-test.sh index 0e1b160822b..c063539ab5a 100755 --- a/.github/actions/quick-test/quick-test.sh +++ b/.github/actions/quick-test/quick-test.sh @@ -27,6 +27,7 @@ MVN_OPTS=${MVN_OPTS:-$MVN_DEFAULT_OPTS} # Script variables failures=0 +successes=0 maxNumberOfTestableComponents=20 basedir=$(pwd) testDate=$(date '+%Y-%m-%d-%H%M%S') @@ -67,6 +68,7 @@ function runTest() { ((failures++)) notifyError "${component} test" "${total}" "${current}" "${failures}" else + ((successes++)) notifySuccess "${component}" "${total}" "${current}" "${failures}" fi @@ -111,7 +113,6 @@ function main() { coreTest fi - echo "Searching for modified components" local components=$(git diff "${startCommit}..${endCommit}" --name-only --pretty=format:"" | grep -e '^components' | grep -v -e '^$' | cut -d / -f 1-2 | uniq | sort) local total=$(echo "${components}" | grep -v -e '^$' | wc -l) @@ -120,11 +121,13 @@ function main() { if [[ ${total} -eq 0 ]]; then echo "0" > "${logDir}/tested" echo "0" > "${logDir}/failures" + echo "0" > "${logDir}/successes" exit 0 else if [[ ${total} -gt ${maxNumberOfTestableComponents} ]]; then echo "0" > "${logDir}/tested" echo "0" > "${logDir}/failures" + echo "0" > "${logDir}/successes" exit 0 fi fi @@ -142,6 +145,7 @@ function main() { echo "${total}" > "${logDir}/tested" echo "${failures}" > "${logDir}/failures" + echo "${successes}" > "${logDir}/successes" exit "${failures}" } diff --git a/.github/workflows/component-pr.yaml b/.github/workflows/component-pr.yaml index 20a46a420b6..47836d91326 100644 --- a/.github/workflows/component-pr.yaml +++ b/.github/workflows/component-pr.yaml @@ -47,7 +47,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `:star2: Thanks for your contribution to the Apache Camel project! :star2: + body: `:star2: Thank you for your contribution to the Apache Camel project! :star2: :warning: Please note that the changes on this PR may be **tested automatically**. @@ -92,7 +92,8 @@ jobs: let total = Number(fs.readFileSync('./total')); let tested = Number(fs.readFileSync('./tested')); let failures = Number(fs.readFileSync('./failures')); - + let successes = Number(fs.readFileSync('./successes')); + var message = "" if (tested === 0) { @@ -104,11 +105,11 @@ jobs: } } } else { - if (failures === 0) { - message = `:heavy_check_mark: Finished component verification: ${failures} component(s) test failed out of **${tested} component(s) tested**` - } else { - message = `:x: Finished component verification: **${failures} component(s) test failed** out of ${tested} component(s) tested` - } + message = `### Components tested: + | Total | Tested | Failed :x: | Passed :white_check_mark: | + | --- | --- | --- | --- | + | ${total} | ${tested} | ${failures} | ${successes} | + ` } await github.rest.issues.createComment({
