From 6077e8b7a68cc178603fd257431dd0452ad84b0c Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 3 Sep 2025 23:25:53 +0100 Subject: [PATCH] ci: stabilize CI (always run jobs, robust /health wait) --- .github/workflows/ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bc79688..e022ee82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,6 @@ on: jobs: node: - if: ${{ hashFiles('package.json') != '' }} runs-on: ubuntu-latest steps: - name: Checkout @@ -22,10 +21,13 @@ jobs: run: npm ci - name: API health (offline) run: | - DEV_NO_API=1 node backend/index.cjs & - echo $! > api.pid - sleep 1 - curl -fsS http://127.0.0.1:8790/health | tee health.json + DEV_NO_API=1 node backend/index.cjs & echo $! > api.pid + for i in {1..20}; do + if curl -fsS http://127.0.0.1:8790/health >/dev/null; then + curl -fsS http://127.0.0.1:8790/health | tee health.json; break + fi + sleep 0.3 + done kill $(cat api.pid) - name: Run ESLint (npx) run: npx -y eslint . @@ -35,7 +37,6 @@ jobs: run: npm run -s test --if-present python: - if: ${{ hashFiles('requirements.txt') != '' || hashFiles('pyproject.toml') != '' }} runs-on: ubuntu-latest steps: - name: Checkout