diff options
author | Cristian Adam <cristian.adam@qt.io> | 2020-02-20 19:33:34 +0100 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2020-02-21 10:42:46 +0000 |
commit | ea7d59e58a20d01216905066854f71b1932d63db (patch) | |
tree | ceeeb7201408569c687b29cc0923e655fd9f9c67 /.github/workflows | |
parent | 5835e22793b33802b6dc50f124ee980fa16795ff (diff) |
GitHub Actions: Display tests pass rate as warning annotation
Change-Id: I7d9970067b786f34fc29c82f85c5fc31f6d02704
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build_cmake.yml | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index a8ff73315c..3926da6b0c 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -358,13 +358,18 @@ jobs: COMMAND ${{ steps.cmake_and_ninja.outputs.cmake_dir }}/ctest -j ${N} WORKING_DIRECTORY build RESULT_VARIABLE result + OUTPUT_VARIABLE stdout + ERROR_VARIABLE stdout ) - # Do not fail on ctest failure - #if (NOT result EQUAL 0) - # message(FATAL_ERROR "Running tests failed!") - #endif() + message("${stdout}") + if (NOT result EQUAL 0) + string(REGEX MATCH "[0-9]+% tests.*[0-9.]+ sec" pass_rate "${stdout}") + + # Do not fail on ctest failure + message("::warning::${pass_rate}") + endif() - name: Install Strip run: | |