Git fork

ci(github): bring back the 'print test failures' step

Git now shows better information in the GitHub workflow runs when a test
case failed. However, when a test case was implemented incorrectly and
therefore does not even run, nothing is shown.

Let's bring back the step that prints the full logs of the failed tests,
and to improve the user experience, print out an informational message
for readers so that they do not have to know/remember where to see the
full logs.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Johannes Schindelin and committed by
Junio C Hamano
5aeb1457 3069f2a6

+18 -1
+16
.github/workflows/main.yml
··· 119 119 - name: test 120 120 shell: bash 121 121 run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10 122 + - name: print test failures 123 + if: failure() && env.FAILED_TEST_ARTIFACTS != '' 124 + shell: bash 125 + run: ci/print-test-failures.sh 122 126 - name: Upload failed tests' directories 123 127 if: failure() && env.FAILED_TEST_ARTIFACTS != '' 124 128 uses: actions/upload-artifact@v2 ··· 200 204 env: 201 205 NO_SVN_TESTS: 1 202 206 run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10 207 + - name: print test failures 208 + if: failure() && env.FAILED_TEST_ARTIFACTS != '' 209 + shell: bash 210 + run: ci/print-test-failures.sh 203 211 - name: Upload failed tests' directories 204 212 if: failure() && env.FAILED_TEST_ARTIFACTS != '' 205 213 uses: actions/upload-artifact@v2 ··· 253 261 - uses: actions/checkout@v2 254 262 - run: ci/install-dependencies.sh 255 263 - run: ci/run-build-and-tests.sh 264 + - name: print test failures 265 + if: failure() && env.FAILED_TEST_ARTIFACTS != '' 266 + shell: bash 267 + run: ci/print-test-failures.sh 256 268 - name: Upload failed tests' directories 257 269 if: failure() && env.FAILED_TEST_ARTIFACTS != '' 258 270 uses: actions/upload-artifact@v2 ··· 282 294 - uses: actions/checkout@v1 283 295 - run: ci/install-docker-dependencies.sh 284 296 - run: ci/run-build-and-tests.sh 297 + - name: print test failures 298 + if: failure() && env.FAILED_TEST_ARTIFACTS != '' 299 + shell: bash 300 + run: ci/print-test-failures.sh 285 301 - name: Upload failed tests' directories 286 302 if: failure() && env.FAILED_TEST_ARTIFACTS != '' 287 303 uses: actions/upload-artifact@v1
+2 -1
ci/lib.sh
··· 177 177 test_name="${test_exit%.exit}" 178 178 test_name="${test_name##*/}" 179 179 printf "\\e[33m\\e[1m=== Failed test: ${test_name} ===\\e[m\\n" 180 - echo "The full logs are in the artifacts attached to this run." 180 + echo "The full logs are in the 'print test failures' step below." 181 + echo "See also the 'failed-tests-*' artifacts attached to this run." 181 182 cat "t/test-results/$test_name.markup" 182 183 183 184 trash_dir="t/trash directory.$test_name"