From ecfde3c0dcfcb43fab553ca1182842df62bba475 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Thu, 11 Jul 2024 10:10:18 +0200 Subject: [PATCH 1/2] remove useless code from workflow This was never used because of limitations of running on PRs. Other approaches have been used since. --- .github/workflows/run-tests.yml | 53 --------------------------------- 1 file changed, 53 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 7d2cc56a3ed5..0c0ea4be58c7 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -227,59 +227,6 @@ jobs: # set -e # switch back # docker stop qgis-testing-environment - -# tests-report-comment: -# name: Write tests report in a comment -# needs: build -# runs-on: ubuntu-latest -# if: always() && ( needs.build.result == 'failure' || needs.build.result == 'success' ) && github.event_name == 'pull_request' -# steps: -# - name: Find Comment -# uses: peter-evans/find-comment@v1 -# id: find-comment -# with: -# issue-number: ${{ github.event.pull_request.number }} -# comment-author: 'github-actions[bot]' -# body-includes: Tests report -# -# - name: Create comment -# if: ${{ steps.find-comment.outputs.comment-id == 0 }} -# uses: peter-evans/create-or-update-comment@v1 -# id: create-comment -# with: -# issue-number: ${{ github.event.pull_request.number }} -# body: | -# **Tests report** -# -# - name: Process -# id: process-vars -# env: -# COMMENT_FOUND: ${{ steps.find-comment.outputs.comment-id }} -# COMMENT_CREATED: ${{ steps.create-comment.outputs.comment-id }} -# COMMIT_SHA: ${{ github.event.pull_request.head.sha }} -# CDASH_URL: ${{ needs.build.outputs.cdash_url }} -# COMPILE_OUTCOME: ${{ needs.build.outputs.compile_outcome }} -# TESTS_FAILING: ${{ needs.build.outputs.tests_failing }} -# RUNNERS_OUTCOME: ${{ needs.build.outputs.runners_outcome }} -# run: | -# echo "::set-output name=COMMENT_ID::"$([[ "${COMMENT_FOUND}" -eq "0" ]] && echo ${COMMENT_CREATED} || echo ${COMMENT_FOUND}) -# if [[ ${COMPILE_OUTCOME} != "success" ]]; then -# echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :scream: compilation failed" -# elif [[ ${TESTS_FAILING} != "0" ]]; then -# echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :fire: ${TESTS_FAILING} unit-tests are failing ${CDASH_URL}" -# elif [[ ${RUNNERS_OUTCOME} != "success" ]]; then -# echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :broken_heart: QGIS runners test failed" -# else -# echo "::set-output name=COMMENT_BODY::${COMMIT_SHA} :sunglasses: unit-tests succeeded" -# fi -# -# - name: Update comment -# uses: peter-evans/create-or-update-comment@v1 -# with: -# comment-id: ${{ steps.process-vars.outputs.COMMENT_ID }} -# edit-mode: append -# body: ${{ steps.process-vars.outputs.COMMENT_BODY }} - run-tests: name: Run tests env: From 48ed9b80e77f394862976240c1e6af274f571512 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Thu, 11 Jul 2024 11:35:33 +0200 Subject: [PATCH 2/2] comment set-output --- .ci/ctest2ci.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/ctest2ci.py b/.ci/ctest2ci.py index f0722f7216c7..9a6ee626ef7a 100755 --- a/.ci/ctest2ci.py +++ b/.ci/ctest2ci.py @@ -111,7 +111,7 @@ def start_test_fold(): if not in_failing_test and re.search('[0-9]+% tests passed, [0-9]+ tests failed out of', updated_line): tests_failing = re.match(r'.* ([0-9]+) tests failed', updated_line).group(1) - updated_line += '\n::set-output name=TESTS_FAILING::{}'.format(tests_failing) + # updated_line += '\n::set-output name=TESTS_FAILING::{}'.format(tests_failing) end_fold() if re.search('100% tests passed', updated_line): @@ -121,7 +121,7 @@ def start_test_fold(): start_fold('submit') elif re.search('Test results submitted to', updated_line): cdash_url = re.match(r'.*(http.*)$', updated_line).group(1) - updated_line += '\n::set-output name=CDASH_URL::{}'.format(cdash_url) + # updated_line += '\n::set-output name=CDASH_URL::{}'.format(cdash_url) end_fold() sys.stdout.write(updated_line)