Skip to content

Commit d0d96b8

Browse files
committed
Merge branch 'js/ci-github-workflow-markup'
Recent CI update hides certain failures in test jobs, which has been corrected. * js/ci-github-workflow-markup: ci(github): also mark up compile errors ci(github): use grouping also in the `win-build` job ci(github): bring back the 'print test failures' step
2 parents e870c58 + cadcafc commit d0d96b8

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ jobs:
119119
- name: test
120120
shell: bash
121121
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
122126
- name: Upload failed tests' directories
123127
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
124128
uses: actions/upload-artifact@v2
@@ -200,6 +204,10 @@ jobs:
200204
env:
201205
NO_SVN_TESTS: 1
202206
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
203211
- name: Upload failed tests' directories
204212
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
205213
uses: actions/upload-artifact@v2
@@ -253,6 +261,10 @@ jobs:
253261
- uses: actions/checkout@v2
254262
- run: ci/install-dependencies.sh
255263
- 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
256268
- name: Upload failed tests' directories
257269
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
258270
uses: actions/upload-artifact@v2
@@ -282,6 +294,10 @@ jobs:
282294
- uses: actions/checkout@v1
283295
- run: ci/install-docker-dependencies.sh
284296
- 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
285301
- name: Upload failed tests' directories
286302
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
287303
uses: actions/upload-artifact@v1

ci/lib.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,14 @@ else
2929
set +x
3030
begin_group "$1"
3131
shift
32-
"$@"
33-
res=$?
32+
# work around `dash` not supporting `set -o pipefail`
33+
(
34+
"$@" 2>&1
35+
echo $? >exit.status
36+
) |
37+
sed 's/^\(\([^ ]*\):\([0-9]*\):\([0-9]*:\) \)\(error\|warning\): /::\5 file=\2,line=\3::\1/'
38+
res=$(cat exit.status)
39+
rm exit.status
3440
end_group
3541
return $res
3642
}
@@ -177,7 +183,8 @@ then
177183
test_name="${test_exit%.exit}"
178184
test_name="${test_name##*/}"
179185
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."
186+
echo "The full logs are in the 'print test failures' step below."
187+
echo "See also the 'failed-tests-*' artifacts attached to this run."
181188
cat "t/test-results/$test_name.markup"
182189

183190
trash_dir="t/trash directory.$test_name"

ci/make-test-artifacts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ mkdir -p "$1" # in case ci/lib.sh decides to quit early
77

88
. ${0%/*}/lib.sh
99

10-
make artifacts-tar ARTIFACTS_DIRECTORY="$1"
10+
group Build make artifacts-tar ARTIFACTS_DIRECTORY="$1"
1111

1212
check_unignored_build_artifacts

0 commit comments

Comments
 (0)