ci: annotate native workspace-test failures
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 canceled
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 canceled
The Windows/macOS jobs fail inside cargo test --workspace, but public check annotations only show the step exit. Tee the output and emit the failing test, panic or build-error line as a check annotation so the native failure is diagnosable without repository-admin log access. Behaviour and exit status are unchanged.
This commit is contained in:
1 parent
f9ef2328c6
commit
95e4c6b1a4
1 file changed
+16
-1
@@ -124,7 +124,22 @@ jobs:
|
||||
(command -v python3 && python3 --version) || echo "python3: unavailable"
|
||||
(command -v node && node --version) || echo "node: unavailable"
|
||||
- name: Workspace tests
|
||||
run: cargo test --workspace
|
||||
shell: bash
|
||||
run: |
|
||||
set +e
|
||||
cargo test --workspace 2>&1 | tee workspace-tests.log
|
||||
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
|
||||
fi
|
||||
exit "$status"
|
||||
- name: Portable CLI, analysis and trace smoke
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
Reference in new issue
Block a user