ci: annotate the native test panic context
CI / fmt + clippy + test (Linux x86_64) (push) Waiting to run
CI / schema instance validation + consumers (push) Waiting to run
CI / runtime contract (macos-latest) (push) Waiting to run
CI / runtime contract (windows-latest) (push) Waiting to run
Linux strict security lane (G-C) / strict isolation escape matrix (push) Waiting to run
ci/woodpecker/push/woodpecker Pipeline was successful

The native matrix only annotated the first matching line, which omitted the
fixture name and expected/actual values. Annotate the panic block and build
error context instead so the failing golden is identifiable from the public
check-run annotations.
This commit is contained in:
cflmy committed 2026-11-21 18:13:43 +08:00
1 parent 95e4c6b1a4
commit d441d6f4cc
1 file changed
+9 -7
+9 -7
View File
@@ -131,13 +131,15 @@ jobs:
status=${PIPESTATUS[0]}
set -e
if [ "$status" -ne 0 ]; then
# Surface the actual failing test/build line as a check annotation
# so a native-matrix failure is diagnosable without admin log access.
grep -E "^(test .* FAILED|failures:|thread .* panicked|error(\[|:))" workspace-tests.log \
| head -40 \
| while IFS= read -r line; do
echo "::error title=Workspace tests on ${{ matrix.os }}::$line"
done
# Surface the failing test/build context as check annotations so a
# native-matrix failure is diagnosable without admin log access.
{
grep -n -A 18 -B 2 "panicked at" workspace-tests.log || true
grep -n -A 6 -B 2 "^error" workspace-tests.log || true
grep -n "test .* FAILED" workspace-tests.log || true
} | head -80 | while IFS= read -r line; do
echo "::error title=Workspace tests on ${{ matrix.os }}::$line"
done
fi
exit "$status"
- name: Portable CLI, analysis and trace smoke