Skip to content
Permalink
Browse files

post comment with CDASH url when tests are failing

  • Loading branch information
3nids authored and nyalldawson committed Feb 8, 2021
1 parent 3004f3b commit d87280f7521ec8c1739cf4622b7b519fdca704e4
Showing with 12 additions and 3 deletions.
  1. +2 −2 .ci/config.ctest
  2. +10 −1 .github/workflows/run-tests.yml
@@ -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("")
@@ -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)
@@ -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 d87280f

Please sign in to comment.