Skip to content

Add Makefile with start, dev, docker, clean targets #29

Add Makefile with start, dev, docker, clean targets

Add Makefile with start, dev, docker, clean targets #29

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint-and-start:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Check syntax (all JS files parse)
run: node -e "const fs=require('fs'),path=require('path');function check(d){fs.readdirSync(d,{withFileTypes:true}).forEach(e=>{const p=path.join(d,e.name);if(e.isDirectory()&&!['node_modules','landing'].includes(e.name))check(p);else if(e.name.endsWith('.js'))try{require(p)}catch(err){if(err instanceof SyntaxError){console.error('Syntax error:',p,err.message);process.exit(1)}}})};check('./lib')"
- name: Server starts and responds on /api/health
run: |
node server.js &
SERVER_PID=$!
sleep 3
STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3001/api/health)
kill $SERVER_PID 2>/dev/null || true
if [ "$STATUS" != "200" ]; then
echo "Health check failed with status $STATUS"
exit 1
fi
echo "Health check passed (HTTP $STATUS)"
env:
MONITOR_PORT: 3001
MONITOR_USER: ci
MONITOR_PASS: ci-test-pass