ci: start Web E2E after PR image validate finishes
Docker validate and Vite E2E on the same self-hosted host left signup flakes; poll publish-server-image for this commit before Playwright starts. Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
This commit is contained in:
parent
f35ba6f81c
commit
68134518fc
30
.github/workflows/playwright.yml
vendored
30
.github/workflows/playwright.yml
vendored
@ -49,17 +49,45 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
playwright:
|
||||
name: Web E2E
|
||||
runs-on: [self-hosted, evoo-ci, Linux]
|
||||
timeout-minutes: 45
|
||||
timeout-minutes: 60
|
||||
concurrency:
|
||||
group: ${{ inputs.publish_report && 'playwright-publication' || format('playwright-{0}', github.run_id) }}
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Wait for PR image validate on shared self-hosted runners
|
||||
if: github.event_name == 'pull_request'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
sha="${HEAD_SHA:-$GITHUB_SHA}"
|
||||
echo "Waiting for publish-server-image on ${sha} before starting Vite…"
|
||||
for attempt in $(seq 1 120); do
|
||||
run_id="$(gh run list --repo "${GITHUB_REPOSITORY}" --commit "${sha}" \
|
||||
--workflow publish-server-image.yml --limit 1 \
|
||||
--json databaseId,status -q '.[0].databaseId // empty')"
|
||||
if [[ -z "${run_id}" ]]; then
|
||||
echo "No publish-server-image run for this commit; continuing."
|
||||
exit 0
|
||||
fi
|
||||
status="$(gh run view "${run_id}" --repo "${GITHUB_REPOSITORY}" --json status -q .status)"
|
||||
if [[ "${status}" == "completed" ]]; then
|
||||
echo "publish-server-image run ${run_id} completed."
|
||||
exit 0
|
||||
fi
|
||||
echo "Attempt ${attempt}/120: publish-server-image still ${status}…"
|
||||
sleep 30
|
||||
done
|
||||
echo "Timed out waiting for publish-server-image (60 min)" >&2
|
||||
exit 1
|
||||
- uses: pnpm/action-setup@v4
|
||||
id: pnpm-setup
|
||||
with:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user