From 95e4c6b1a4041f35862353048fe6b1c442820e68 Mon Sep 17 00:00:00 2001 From: cflmy Date: Sat, 21 Nov 2026 18:09:28 +0800 Subject: [PATCH] ci: annotate native workspace-test failures 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. --- .github/workflows/ci.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acbeee3..a30f80f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: |