From 628009d4682982f6e06d9c9511a13d958600a459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=27=C3=A9lectron=20rare?= <108685187+electron-rare@users.noreply.github.com> Date: Mon, 18 May 2026 21:31:05 +0200 Subject: [PATCH] chore: replace bogus e2e workflow with real CI The previous ci-e2e.yml was a copy-paste from the mascarade repo: it pointed at /home/clems/mascarade/web and required a self-hosted runner that was offline, so the e2e check sat queued 24h before GitHub auto-cancelled it as failed. This site has no Playwright suite, so the check was meaningless. Replace it with ci.yml: a minimal Node 22 job on ubuntu-latest that runs typecheck and build for the Astro app, with the existing ntfy failure notification hook. --- .github/workflows/ci-e2e.yml | 41 ------------------------------------ .github/workflows/ci.yml | 37 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/ci-e2e.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci-e2e.yml deleted file mode 100644 index ce94f3d..0000000 --- a/.github/workflows/ci-e2e.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: CI + E2E - -on: - push: - branches: [main] - pull_request: - workflow_dispatch: - -jobs: - e2e: - runs-on: self-hosted - timeout-minutes: 10 - steps: - - name: Run E2E tests - id: e2e - run: | - cd /home/clems/mascarade/web - BASE_URL=http://localhost:3100 npx playwright test --reporter=line 2>&1 | tee /tmp/e2e-output.txt - PASSED=$(grep -oP '\d+ passed' /tmp/e2e-output.txt | grep -oP '\d+' || echo 0) - FAILED=$(grep -oP '\d+ failed' /tmp/e2e-output.txt | grep -oP '\d+' || echo 0) - echo "passed=$PASSED" >> $GITHUB_OUTPUT - echo "failed=$FAILED" >> $GITHUB_OUTPUT - if [ "${FAILED:-0}" != "0" ] && [ "${FAILED:-0}" != "" ]; then exit 1; fi - - - name: Notify ntfy on failure - if: failure() - run: | - curl -s -d "E2E FAILED: ${{ steps.e2e.outputs.failed }} tests failed on $(date '+%H:%M')" \ - -H "Title: Ops ER E2E Failed" \ - -H "Priority: high" \ - -H "Tags: rotating_light" \ - https://ntfy.saillant.cc/ops-alerts 2>/dev/null || true - - - name: Notify ntfy on success - if: success() - run: | - curl -s -d "E2E OK: ${{ steps.e2e.outputs.passed }} passed" \ - -H "Title: Ops ER E2E Pass" \ - -H "Priority: low" \ - -H "Tags: white_check_mark" \ - https://ntfy.saillant.cc/ops-alerts 2>/dev/null || true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..eb09215 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - name: Install + run: npm ci + + - name: Typecheck + run: npm run typecheck + + - name: Build + run: npm run build + + - name: Notify ntfy on failure + if: failure() + run: | + curl -s -d "CI FAILED on ${{ github.ref_name }} @ $(date '+%H:%M') — ${{ github.sha }}" \ + -H "Title: ER github.io CI Failed" \ + -H "Priority: high" \ + -H "Tags: rotating_light" \ + https://ntfy.saillant.cc/ops-alerts 2>/dev/null || true