ci: revert to run-12 workflow state — retries restored, diagnostics removed
This commit is contained in:
+32
-18
@@ -31,22 +31,6 @@ jobs:
|
||||
docker network inspect flight-ci-e2e --format 'containers on flight-ci-e2e: {{range .Containers}}{{.Name}} {{end}}'
|
||||
echo "E2E_BASE_URL=http://app:3000" >> "$GITHUB_ENV"
|
||||
|
||||
# Non-fatal DNS diagnostics (runner outbound DNS is flaky — EAI_AGAIN seen in CI):
|
||||
# logs job-container vs daemon-side resolver config + per-host lookups so the next
|
||||
# failure shows which layer is broken. Every probe is guarded; this step never fails.
|
||||
- name: DNS diagnostics
|
||||
run: |
|
||||
set -u
|
||||
echo '=== job container ==='
|
||||
cat /etc/resolv.conf || echo 'resolv.conf FAILED'
|
||||
for h in registry.npmjs.org cdn.playwright.dev github.com docker.io; do
|
||||
getent hosts "$h" >/dev/null 2>&1 && echo "getent $h OK" || echo "getent $h FAILED"
|
||||
done
|
||||
curl -so /dev/null --max-time 10 -w 'registry.npmjs.org https %{time_total}s\n' https://registry.npmjs.org || echo 'curl registry FAILED'
|
||||
echo '=== daemon-side (default bridge) ==='
|
||||
# node:22-alpine is already local on the shared daemon (CI builds use it) — no pull needed when the network is down.
|
||||
timeout 90 docker run --rm node:22-alpine sh -c "cat /etc/resolv.conf; node -e \"require('dns').lookup('registry.npmjs.org',(e,a)=>{console.log(e?'daemon-bridge DNS FAILED':'daemon-bridge DNS OK '+a);process.exit(e?1:0)})\"" || echo 'daemon-side probe FAILED'
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
@@ -54,9 +38,17 @@ jobs:
|
||||
|
||||
# bun drives installs (repo ships bun.lock, no package-lock.json); pinned to the
|
||||
# same major as oven/bun in the Dockerfile.
|
||||
# Retried: the runner's outbound network/DNS is flaky (transient EAI_AGAIN seen in CI).
|
||||
- name: Install bun
|
||||
run: |
|
||||
npm i -g bun@1.4.2
|
||||
set -u
|
||||
ok=0
|
||||
for i in 1 2 3; do
|
||||
if npm i -g bun@1.4.2; then ok=1; break; fi
|
||||
echo "::warning::bun install attempt $i/3 failed (likely transient network) — retrying in 5s" >&2
|
||||
sleep 5
|
||||
done
|
||||
[ "$ok" = "1" ] || { echo "::error::bun install failed after 3 attempts" >&2; exit 1; }
|
||||
bun --version
|
||||
|
||||
# Job-level dep cache via the runner's built-in cache server. continue-on-error on
|
||||
@@ -70,8 +62,17 @@ jobs:
|
||||
$HOME/.bun/install/cache
|
||||
key: ${{ runner.os }}-deps-bun-${{ hashFiles('bun.lock') }}
|
||||
|
||||
# Retried: the runner's outbound network/DNS is flaky (transient EAI_AGAIN seen in CI).
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
run: |
|
||||
set -u
|
||||
ok=0
|
||||
for i in 1 2 3; do
|
||||
if bun install --frozen-lockfile; then ok=1; break; fi
|
||||
echo "::warning::dependency install attempt $i/3 failed (likely transient network) — retrying in 5s" >&2
|
||||
sleep 5
|
||||
done
|
||||
[ "$ok" = "1" ] || { echo "::error::dependency install failed after 3 attempts" >&2; exit 1; }
|
||||
|
||||
- name: Save deps cache
|
||||
uses: actions/cache@v4
|
||||
@@ -94,6 +95,19 @@ jobs:
|
||||
- name: Install browsers (local)
|
||||
run: npx playwright install --with-deps chromium
|
||||
|
||||
# Pre-build the e2e image with retries (flaky runner network); the E2E step's own
|
||||
# build then becomes a fast no-op. Plain progress keeps BuildKit output visible.
|
||||
- name: Build e2e image (retries)
|
||||
run: |
|
||||
set -u
|
||||
ok=0
|
||||
for i in 1 2 3; do
|
||||
if docker compose -f docker-compose.ci.yml -p flight-ci build --progress=plain; then ok=1; break; fi
|
||||
echo "::warning::e2e image build attempt $i/3 failed (likely transient network) — retrying in 5s" >&2
|
||||
sleep 5
|
||||
done
|
||||
[ "$ok" = "1" ] || { echo "::error::e2e image build failed after 3 attempts" >&2; exit 1; }
|
||||
|
||||
# E2E against an isolated stack on the shared daemon — never the production instance.
|
||||
# docker-compose.ci.yml joins the flight-ci-e2e network prepared above; project name
|
||||
# flight-ci keeps it distinct from production. E2E_DEPLOY_CMD makes the config's
|
||||
|
||||
Reference in New Issue
Block a user