forked from oklemenz/LemmingsJS
-
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (67 loc) · 2.3 KB
/
test.yml
File metadata and controls
70 lines (67 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Node.js CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- uses: actions/setup-node@v4.2.0
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm audit --audit-level=moderate
- run: npx playwright install --with-deps chromium
- run: npm run format
- name: Check changed-line whitespace
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
git diff --check "origin/${{ github.base_ref }}...HEAD"
else
git diff --check "${{ github.event.before }}...HEAD"
fi
- run: git diff --exit-code
- run: npm run check-undefined
- run: npm run lint
- run: npm run typecheck:critical
- run: npm run release-readiness
- run: npm run depcheck
- run: npm run check-mcp-clients
- run: npm run test-bench-unit
- run: npm test
- name: Create localhost HTTPS cert
run: |
mkdir -p certs
openssl req -x509 -newkey rsa:2048 -nodes \
-keyout certs/localhost-key.pem \
-out certs/localhost.pem \
-days 1 \
-subj "/CN=localhost" \
-addext "subjectAltName=DNS:localhost,IP:127.0.0.1"
- name: Start HTTPS server
run: |
npm run start-https > /tmp/lemmings-http.log 2>&1 &
echo $! > /tmp/lemmings-http.pid
node -e "const https=require('node:https'); const started=Date.now(); const tick=()=>{const req=https.get('https://localhost:8080/?e2e=1',{rejectUnauthorized:false},res=>{res.resume(); process.exit(0);}); req.on('error',()=>{if(Date.now()-started>30000) process.exit(1); setTimeout(tick,500);});}; tick();"
- run: npm run test-mcp-smoke
- run: npm run bench-smoke
- name: Stop HTTPS server
if: always()
run: |
if [ -f /tmp/lemmings-http.pid ]; then
kill "$(cat /tmp/lemmings-http.pid)" || true
fi
- run: npm run coverage
- uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage