Repository navigation
[visual testing] Upload visual E2E test results for test history - #59858
Merged
Merged
Conversation
robhogan
force-pushed
the
robhogan/upload-test-results
branch
from
November 10, 2026 16:11
8a9a3d5 to
48087cf
Compare
robhogan
force-pushed
the
robhogan/upload-test-results
branch
from
November 10, 2026 16:24
48087cf to
e4379a8
Compare
robhogan
force-pushed
the
robhogan/upload-test-results
branch
from
November 12, 2026 14:18
e4379a8 to
5c3259b
Compare
After every Test All run, including PRs from forks, a trusted `workflow_run` workflow on the default branch copies each E2E job's per-flow `results.json`, an `artifacts.json` listing every artifact in the run with its GitHub link (so recordings and logs can be linked), and a `run.json` describing the run to `verify/incoming/<repo>/<run-id>-<attempt>/` in the visual testing bucket. It reuses the visual testing GCP variables and skips when they are unset. Artifacts are copied as data: only `results.json` is extracted from each archive, size-limited, and nothing is executed. An attempt whose test state a later rerun has replaced isn't recorded, so a late upload of an earlier attempt can't store incomplete or later results. GitHub API calls are retried. Objects are write-once, with `run.json` uploaded last to mark a run complete. Changelog: [Internal]
robhogan
force-pushed
the
robhogan/upload-test-results
branch
from
November 12, 2026 15:34
5c3259b to
7b75010
Compare
cortinico
reviewed
Nov 12, 2026
| steps: | ||
| - name: Download test results | ||
| run: | | ||
| set -euo pipefail |
Contributor
There was a problem hiding this comment.
probably having this in a standalone bash file would be better?
Collaborator
Author
There was a problem hiding this comment.
Done in 06844c8 - it all lives in .github/workflow-scripts/upload-test-results.sh now.
Comment on lines
+122
to
+129
| retry() { | ||
| for attempt in 1 2 3; do | ||
| "$@" && return 0 | ||
| echo "Attempt $attempt failed" | ||
| sleep $((attempt * 10)) | ||
| done | ||
| return 1 | ||
| } |
Contributor
There was a problem hiding this comment.
I believe we already have another GH Action to perform an action thrice with retry 🤔 can we reuse it?
usama-liaqat
pushed a commit
to usama-liaqat/react-native
that referenced
this pull request
Nov 14, 2026
* Upload Test All results to GCS for test history After every Test All run, including PRs from forks, a trusted `workflow_run` workflow on the default branch copies each E2E job's per-flow `results.json`, an `artifacts.json` listing every artifact in the run with its GitHub link (so recordings and logs can be linked), and a `run.json` describing the run to `verify/incoming/<repo>/<run-id>-<attempt>/` in the visual testing bucket. It reuses the visual testing GCP variables and skips when they are unset. Artifacts are copied as data: only `results.json` is extracted from each archive, size-limited, and nothing is executed. An attempt whose test state a later rerun has replaced isn't recorded, so a late upload of an earlier attempt can't store incomplete or later results. GitHub API calls are retried. Objects are write-once, with `run.json` uploaded last to mark a run complete. Changelog: [Internal] * Move test result upload steps into a script and download with download-artifact
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #59581.
Collects E2E results from every Test All run, for a test history dashboard (flakiness, first failure, PR failures).
After each Test All run, including fork PRs, a trusted
workflow_runjob copies each E2E job's per-flowresults.json, the run's artifact links and a short run description to the visual testing bucket. It reuses theVISUAL_*variables and create-only OIDC access, and skips when they're unset.Changelog: [Internal]
Test plan:
Ran end-to-end on my fork, including a failed attempt and a rerun. Ran the download step locally against a real failed
mainrun here, and against a stubbedghfor API errors, non-JSON results and an attempt replaced by a later rerun.