mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
ci: inline the two composite actions with one caller each
Both existed to give the matrix a per-target hook. folio-app and headless-chrome stay: three and three callers. Claude-Session: https://claude.ai/code/session_01ShuAy8q8ZfPi8KHxwc8JpQ
This commit is contained in:
1 parent
3235800afe
commit
65007c4f21
2 files changed
-86
No files matched your search
@@ -1,31 +0,0 @@
|
|||||||
name: folio on a simulator
|
|
||||||
description: Boot an iOS simulator, install folio on it, and leave the app stopped.
|
|
||||||
|
|
||||||
inputs:
|
|
||||||
device:
|
|
||||||
description: simulator device name
|
|
||||||
default: iPhone 16 Pro
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: composite
|
|
||||||
steps:
|
|
||||||
- name: Boot a simulator
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
xcrun simctl boot "$IOS_DEVICE" || true
|
|
||||||
xcrun simctl bootstatus "$IOS_DEVICE" -b
|
|
||||||
env:
|
|
||||||
IOS_DEVICE: ${{ inputs.device }}
|
|
||||||
|
|
||||||
- name: Build and install folio
|
|
||||||
shell: bash
|
|
||||||
working-directory: examples/folio
|
|
||||||
run: just ios
|
|
||||||
env:
|
|
||||||
IOS_DEVICE: ${{ inputs.device }}
|
|
||||||
|
|
||||||
# `just ios` leaves the app running, and the run's first act is to clear
|
|
||||||
# its state. Stopping it here means the run always opens the same way.
|
|
||||||
- name: Stop the app before the run
|
|
||||||
shell: bash
|
|
||||||
run: xcrun simctl terminate booted app.folio || true
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
name: replay ui fixture
|
|
||||||
description: Record a trace with sanderling, then serve it with sanderling replay.
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
url:
|
|
||||||
description: the step page of the served run, for a spec to drive
|
|
||||||
value: ${{ steps.serve.outputs.url }}
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: composite
|
|
||||||
steps:
|
|
||||||
# A trace with a violation and uncaught exceptions in it, so the UI has
|
|
||||||
# something to render in every panel the spec looks at. No
|
|
||||||
# --exit-on-violation here: the run is the fixture, and stopping it at the
|
|
||||||
# first violation would leave a four-step trace to fuzz.
|
|
||||||
- name: Record a fixture trace
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
python3 -m http.server 8792 --bind 127.0.0.1 \
|
|
||||||
--directory test/browser/testdata/throwing &
|
|
||||||
ready=""
|
|
||||||
for _ in $(seq 1 30); do
|
|
||||||
curl -sf http://127.0.0.1:8792/ >/dev/null && { ready=1; break; }
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
if [ -z "$ready" ]; then
|
|
||||||
echo "the fixture http server never answered on 127.0.0.1:8792" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
./bin/sanderling test \
|
|
||||||
--platform web \
|
|
||||||
--spec test/browser/testdata/throwing/spec.ts \
|
|
||||||
--bundle-id http://127.0.0.1:8792/ \
|
|
||||||
--duration 5m --max-steps 25 --seed 7 \
|
|
||||||
--output runs/fixture
|
|
||||||
|
|
||||||
- name: Serve the trace with sanderling replay
|
|
||||||
id: serve
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
# Flags before the positional argument: Go's flag package stops
|
|
||||||
# parsing at the first non-flag word.
|
|
||||||
./bin/sanderling replay --port 8793 --no-open runs/fixture &
|
|
||||||
ready=""
|
|
||||||
for _ in $(seq 1 30); do
|
|
||||||
curl -sf http://127.0.0.1:8793/api/runs >/dev/null && { ready=1; break; }
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
if [ -z "$ready" ]; then
|
|
||||||
echo "sanderling replay never served /api/runs on 127.0.0.1:8793" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
run_id="$(ls runs/fixture | head -1)"
|
|
||||||
echo "url=http://127.0.0.1:8793/runs/$run_id/steps/1" >> "$GITHUB_OUTPUT"
|
|
||||||
curl -sf "http://127.0.0.1:8793/runs/$run_id/steps/1" >/dev/null
|
|
||||||
Reference in new issue
Block a user