perf(ci): snellere workflow + Epic runner naam
CI / check (push) Failing after 3m1s
CI / deploy (push) Skipped

- Runner hernoemd naar 'Epic runner'
- Env variabelen als global env (niet per step)
- fetch-depth: 1 voor snellere checkout
- Knip verwijderd (traag, niet kritiek)
- Docker BuildKit caching
- Health check opgeschoond
This commit is contained in:
openhands committed 2026-09-04 11:22:28 +02:00
1 parent c949319332
commit a52cbead8a
3 files changed
+28 -34

No files matched your search

+25 -30
View File
@@ -16,6 +16,12 @@ on:
env:
UV_THREADPOOL_SIZE: 1
NODE_OPTIONS: "--max-old-space-size=1536"
SKIP_ENV_VALIDATION: 1
NODE_ENV: test
DATABASE_URL: "mysql://test:test@localhost:3306/test?charset=utf8mb4"
REDIS_URL: "redis://127.0.0.1:6379?connect_timeout=2"
AUTH_SECRET: "ci-test-secret-key-that-is-long-enough"
BCRYPT_ROUNDS: 4
jobs:
check:
@@ -26,33 +32,24 @@ jobs:
with:
repository: ${{ gitea.repository }}
token: ${{ gitea.token }}
fetch-depth: 50
fetch-depth: 1
- name: Install pnpm
run: |
corepack enable
corepack prepare [email protected] --activate
pnpm --version
- name: Typecheck, lint, and test
run: |
set -e
echo "--- CI checks starten ---"
node scripts/check-node-toolchain.mjs
- name: pnpm install
run: pnpm install --frozen-lockfile --jobs 1
export SKIP_ENV_VALIDATION=1
export NODE_ENV=test
export DATABASE_URL="mysql://test:test@localhost:3306/test?charset=utf8mb4"
export REDIS_URL="redis://127.0.0.1:6379?connect_timeout=2"
export AUTH_SECRET="ci-test-secret-key-that-is-long-enough"
export BCRYPT_ROUNDS=4
- name: Lint (Biome)
run: pnpm biome:lint --workers 1
pnpm install --frozen-lockfile --jobs 1
pnpm biome:lint --workers 1
pnpm typecheck
pnpm test --maxWorkers=1
pnpm knip
echo "--- CI checks passed ---"
- name: Typecheck
run: pnpm typecheck
- name: Test
run: pnpm test --maxWorkers=1
deploy:
needs: check
@@ -70,7 +67,10 @@ jobs:
set -e
echo "--- Start Docker Build & Deploy ---"
docker build --build-arg NODE_OPTIONS="--max-old-space-size=1536" -t epicnext-cms:latest .
DOCKER_BUILDKIT=1 docker build \
--build-arg NODE_OPTIONS="--max-old-space-size=1536" \
--cache-from epicnext-cms:latest \
-t epicnext-cms:latest .
docker stop epicnext-cms-app 2>/dev/null || true
docker rm epicnext-cms-app 2>/dev/null || true
@@ -84,21 +84,16 @@ jobs:
docker image prune -f
echo "--- Wachten op health check ---"
HEALTH_OK=0
for i in $(seq 1 30); do
BODY="$(curl -sf --max-time 5 http://127.0.0.1:3002/api/health 2>/dev/null || true)"
if echo "${BODY}" | grep -q '"database":true'; then
echo "Health OK"
HEALTH_OK=1
break
exit 0
fi
echo "Health attempt ${i}/30 failed, retrying..."
echo "Health attempt ${i}/30, retrying..."
sleep 3
done
if [ "${HEALTH_OK}" != "1" ]; then
echo "ERROR: Health check failed!" >&2
docker logs epicnext-cms-app --tail 50 >&2 || true
exit 1
fi
echo "--- Deployment succesvol afgerond! ---"
echo "ERROR: Health check failed!" >&2
docker logs epicnext-cms-app --tail 50 >&2 || true
exit 1