ci: v0.13.0 — retry wrappers for flaky runner network (bun install, dep install, e2e image build)

This commit is contained in:
2026-09-19 07:53:22 +00:00
parent 579d425b64
commit d0149c6ab3
2 changed files with 35 additions and 2 deletions
+34 -2
View File
@@ -38,8 +38,18 @@ 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
run: |
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
# both steps: an unreachable/broken cache server must never break the run.
@@ -52,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
@@ -76,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