Skip to content

Commit

Permalink
post comment with CDASH url when tests are failing
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and nyalldawson committed Feb 3, 2021
1 parent 9038ec1 commit afd6e11
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .ci/config.ctest
Expand Up @@ -67,7 +67,7 @@ IF(NOT IGNORE_BUILD_FAILURES)
MESSAGE(" ${Yellow}Test results submitted to${ColorReset}")
MESSAGE(" ${BoldYellow}${SHORTURL}${ColorReset}")
# Github workflow output
MESSAGE("::set-output name=CDASH_URL::${SHORTURL}$")
MESSAGE("::set-output name=CDASH_URL::${SHORTURL}")
MESSAGE("")
MESSAGE( FATAL_ERROR " ${Red}Build failed. Not running tests.${ColorReset}" )
MESSAGE("")
Expand All @@ -80,7 +80,7 @@ IF(NOT ${NUMWARN} EQUAL 0 OR NOT ${TESTRES} EQUAL 0)
MESSAGE(" ${Yellow}Test results submitted to${ColorReset}")
MESSAGE(" ${BoldYellow}${SHORTURL}${ColorReset}" )
# Github workflow output
MESSAGE("::set-output name=CDASH_URL::${SHORTURL}$")
MESSAGE("::set-output name=CDASH_URL::${SHORTURL}")
MESSAGE("")
SET(LEVEL "")
IF(NOT ${TESTRES} EQUAL 0)
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/run-tests.yml
Expand Up @@ -160,6 +160,15 @@ jobs:
name: Publish link to CDASH
needs: build
runs-on: ubuntu-latest
if: failure()
if: failure() and github.event_name == 'pull_request'
steps:
- run: echo "${{ needs.build.outputs.cdash_url }}"

- name: Create comment
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ steps.token.outputs.token }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Some tests are failing.
Tests results: ${{ needs.build.outputs.cdash_url }}

0 comments on commit afd6e11

Please sign in to comment.