Skip to content

Add missing Node runtime globals (fetch, URL, URLSearchParams, etc.) … #17

Add missing Node runtime globals (fetch, URL, URLSearchParams, etc.) …

Add missing Node runtime globals (fetch, URL, URLSearchParams, etc.) … #17

Workflow file for this run

name: CI
on:
push:
branches: ["**"]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- name: Lint render.yaml
run: |
set -e
npx --yes yaml-lint render.yaml
- name: Install dependencies
run: npm ci
- name: Syntax-check all source files
run: |
set -e
find . -name "*.js" -not -path "./node_modules/*" -print0 | xargs -0 -n1 node --check
- name: Lint
run: npm run lint
- name: Run unit tests
run: npm test
- name: Smoke test -- server boots and GET /health responds
run: |
set -e
node server.js &
SERVER_PID=$!
ok=""
for i in $(seq 1 10); do
if curl -sf http://localhost:8080/health > /dev/null; then
ok=1
break
fi
sleep 1
done
kill "$SERVER_PID" || true
if [ -z "$ok" ]; then
echo "Server did not become healthy in time"
exit 1
fi
echo "Health check passed"