Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/ci-inline-failure-details.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"playground-cli": patch
---

Failed E2E cells now surface forensic detail (CLI subprocess stdout/stderr from `dot-runs.log`, junit.xml failure messages, and `::error::` annotations at the top of the run page) directly in the GH Actions UI. Previously a triager had to download the artefact and untar it locally to see the real root cause. Closes #98.
37 changes: 37 additions & 0 deletions .github/actions/surface-e2e-failure/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Surface E2E failure detail
description: |
Print dot-runs.log + failed-testcase summary to the job log and emit
::error:: annotations so triagers see the real root cause without
downloading artefacts. Intended to run with `if: failure()` after a
cell's test step.

runs:
using: composite
steps:
- name: Dump dot-runs.log + failed testcases
shell: bash
run: |
echo "::group::dot-runs.log (CLI subprocess stdout/stderr)"
if [ -f e2e-reports/dot-runs.log ]; then
cat e2e-reports/dot-runs.log
else
echo "(no dot-runs.log written — test failed before any dot subprocess ran, or the e2e-reports dir wasn't created)"
fi
echo "::endgroup::"

if [ -f e2e-reports/junit.xml ]; then
if ! command -v xmlstarlet >/dev/null 2>&1; then
sudo apt-get update -q
sudo apt-get install -y -q xmlstarlet
fi
echo "::group::Failed testcases (from junit.xml)"
xmlstarlet sel -t -m "//testcase[failure or error]" \
-v "concat(@classname, ' › ', @name)" -o $'\n ' \
-v "failure/@message | error/@message" -n e2e-reports/junit.xml || true
echo "::endgroup::"

xmlstarlet sel -t -m "//testcase[failure or error]" \
-v "concat('::error file=', @classname, '::', @name, ' — ')" \
-v "failure/@message | error/@message" -n e2e-reports/junit.xml \
| head -c 3000 || true
fi
16 changes: 16 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ jobs:
DOT_TAG: ${{ steps.setup.outputs.tag }}
DOT_TELEMETRY: "1"

- name: Surface failure detail
if: failure()
uses: ./.github/actions/surface-e2e-failure

- name: Upload forensic artefacts
if: always()
continue-on-error: true
Expand Down Expand Up @@ -115,6 +119,10 @@ jobs:
DOT_TAG: ${{ steps.setup.outputs.tag }}
DOT_TELEMETRY: "1"

- name: Surface failure detail
if: failure()
uses: ./.github/actions/surface-e2e-failure

- name: Upload forensic artefacts
if: always()
continue-on-error: true
Expand Down Expand Up @@ -161,6 +169,10 @@ jobs:
DOT_TAG: ${{ steps.setup.outputs.tag }}
DOT_TELEMETRY: "1"

- name: Surface failure detail
if: failure()
uses: ./.github/actions/surface-e2e-failure

- name: Upload forensic artefacts
if: always()
continue-on-error: true
Expand Down Expand Up @@ -217,6 +229,10 @@ jobs:
DOT_TAG: ${{ steps.setup.outputs.tag }}
DOT_TELEMETRY: "1"

- name: Surface failure detail
if: failure()
uses: ./.github/actions/surface-e2e-failure

- name: Upload forensic artefacts
if: always()
continue-on-error: true
Expand Down
Loading