diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7c00eb..d4855e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -208,11 +208,18 @@ jobs: - run: pnpm install --frozen-lockfile - run: pnpm test:integration + wait-pr-image-validate: + name: Wait for PR image validate + if: github.event_name == 'pull_request' + runs-on: [self-hosted, evoo-ci, Linux] + timeout-minutes: 75 + steps: + - name: Let publish-server-image validate finish on this host + run: sleep 2100 + test-e2e: name: Web E2E - permissions: - actions: read - contents: read + needs: [lint, check, build, test, test-integration, wait-pr-image-validate] uses: ./.github/workflows/playwright.yml with: upload_artifacts: true diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index e961abd..be4dd9b 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -54,52 +54,12 @@ jobs: playwright: name: Web E2E runs-on: [self-hosted, evoo-ci, Linux] - permissions: - actions: read - contents: read 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' || github.event_name == 'workflow_call' - env: - GH_TOKEN: ${{ github.token }} - PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} - run: | - set -euo pipefail - shas=("${GITHUB_SHA}") - if [[ -n "${PR_HEAD_SHA}" ]]; then - shas+=("${PR_HEAD_SHA}") - fi - run_id="" - for sha in "${shas[@]}"; do - run_id="$(gh run list --repo "${GITHUB_REPOSITORY}" --commit "${sha}" \ - --workflow publish-server-image.yml --limit 1 \ - --json databaseId -q '.[0].databaseId // empty')" - if [[ -n "${run_id}" ]]; then - echo "Found publish-server-image run ${run_id} for commit ${sha}." - break - fi - done - if [[ -z "${run_id}" ]]; then - echo "No publish-server-image run for ${shas[*]}; continuing." - exit 0 - fi - echo "Waiting for publish-server-image before starting Vite…" - for attempt in $(seq 1 120); do - 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: