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.
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user