Skip to content

Commit 4b804ab

Browse files
committed
ci: test
1 parent 50d754d commit 4b804ab

1 file changed

Lines changed: 28 additions & 4 deletions

File tree

.github/workflows/visual-regression.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ jobs:
6565
# Used as the explorer-automation tests-ref. metaforge falls back to main
6666
# if the branch doesn't exist on explorer-automation's origin.
6767
TEST_REF: ${{ github.event.pull_request.head.ref || github.ref_name }}
68-
TESTS_REF: ${{ github.event.pull_request.head.ref || github.ref_name }}
68+
# TEMPORARY (smoke-test): the explorer-automation visual setup lives on
69+
# feat/snapshots-comparison (PR #2) until merged to main. Once that PR
70+
# lands, switch this back to ${{ github.event.pull_request.head.ref }}
71+
# so per-branch test pairing works for real PRs.
72+
TESTS_REF: feat/snapshots-comparison
6973
PR_NUMBER: ${{ github.event.pull_request.number }}
7074
# TEMPORARY (workflow smoke-test): hardcoded direct URL of a known-green
7175
# Unity Cloud Build for this branch, so we don't block on the in-progress
@@ -122,6 +126,12 @@ jobs:
122126
xattr -dr com.apple.quarantine /Applications/AltTesterDesktop.app || true
123127
ls /Applications/AltTesterDesktop.app/Contents/MacOS/AltTesterDesktop
124128
129+
# Allure CLI: metaforge generates the HTML report with it after each
130+
# run. Pre-install globally so `mf explorer test --non-interactive`
131+
# doesn't hit the "install allure?" prompt.
132+
npm install -g allure-commandline
133+
allure --version
134+
125135
gh --version
126136
127137
- name: Verify MetaForge access
@@ -155,8 +165,15 @@ jobs:
155165
156166
- name: Configure AltTester license
157167
env:
158-
ALTTESTER_LICENSE: ${{ secrets.ALTTESTER_LICENSE }}
159-
run: mf alttester set-license "$ALTTESTER_LICENSE"
168+
# NB: secret name uses British spelling (LICENCE) — set by devops.
169+
ALTTESTER_LICENSE: ${{ secrets.ALTTESTER_LICENCE }}
170+
run: |
171+
set -euo pipefail
172+
if [ -z "${ALTTESTER_LICENSE:-}" ]; then
173+
echo "::error::Missing ALTTESTER_LICENCE secret. Add it under repo Settings → Secrets → Actions."
174+
exit 1
175+
fi
176+
mf alttester set-license "$ALTTESTER_LICENSE"
160177
161178
- name: Pre-install Explorer build
162179
env:
@@ -196,9 +213,16 @@ jobs:
196213
# Surface metaforge logs at info level so failures are diagnosable
197214
# without needing to download artifacts.
198215
MF_LOG_LEVEL: info
216+
# metaforge clones explorer-automation via `gh repo clone`, which
217+
# needs GH_TOKEN to authenticate against the private repo.
218+
GH_TOKEN: ${{ secrets.REPOS_READ_ONLY_TOKEN }}
199219
run: |
200220
set -euo pipefail
201-
mf explorer server start
221+
# Pass --tests-ref to both commands so the managed clone of
222+
# explorer-automation lands on the right branch up front.
223+
# `server start` is what triggers the clone + _host build; if it
224+
# defaults to main, the scenes/ workspace may be missing.
225+
mf explorer server start --tests-ref "${TESTS_REF}"
202226
# Smoke-test: same direct URL as the install step above. Once
203227
# validated, swap back to `"${TEST_REF}"` for per-SHA resolution.
204228
mf explorer test "${BUILD_URL}" \

0 commit comments

Comments
 (0)