Skip to content

Commit d8ddd28

Browse files
committed
ci(dockerized): do show the result of failing tests again
The quality of tests/test suites does not show as much when there are no breakages as in the amount of time required after bugs trigger test failures before the bugs can be identified, analyzed and resolved. As such, it is an unfortunate side effect of 2a21098 (github: adapt containerized jobs to be rootless, 2025-01-10) that the output of failed test cases, which was shown before that change directly in the build logs, is now no longer shown at all. The reason is a side effect of trying to run the build and the tests with permissions other than the `root` user, but without providing the prerequisite permissions to signal what tests failed and whose output hence needs to be included in the logs. The way this signaling works is for the workflow to write into special-purpose files whose path is specific to the current workflow step and which can be accessed via the `$GITHUB_ENV` environment variable, which differs between workflow steps. It is file that has no write permission for the `builder` user that was introduced in above-mentioned commit. The solution is simple: make the file world-writable. Technically, this should be undone after the step, but since nothing uses that file again, it does not matter. This commit is best viewed with `--color-words`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 177f3d3 commit d8ddd28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ jobs:
433433
- run: ci/install-dependencies.sh
434434
- run: useradd builder --create-home
435435
- run: chown -R builder .
436-
- run: sudo --preserve-env --set-home --user=builder ci/run-build-and-tests.sh
436+
- run: chmod o+w $GITHUB_ENV && sudo --preserve-env --set-home --user=builder ci/run-build-and-tests.sh
437437
- name: print test failures
438438
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
439439
run: sudo --preserve-env --set-home --user=builder ci/print-test-failures.sh

0 commit comments

Comments
 (0)