-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·43 lines (35 loc) · 1.06 KB
/
Copy pathtest.sh
File metadata and controls
executable file
·43 lines (35 loc) · 1.06 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
#!/bin/bash
set -e
echo "================================"
echo "Running Go tests..."
echo "================================"
go test -v -race ./server/... ./types/... ./messaging/...
echo ""
echo "================================"
echo "Building server..."
echo "================================"
cd web && npm i && npm run build && cd ..
go build -o poker
echo ""
echo "================================"
echo "Starting server..."
echo "================================"
./poker server &
SERVER_PID=$!
echo "Waiting for server to be ready..."
npx -y wait-on http://localhost:9867 --timeout 30000
echo ""
echo "================================"
echo "Running E2E tests..."
echo "================================"
cd e2e && npm i && npx -y playwright install chromium && CI=true npm test
echo ""
echo "================================"
echo "Cleaning up..."
echo "================================"
kill $SERVER_PID
wait $SERVER_PID 2>/dev/null || true
echo ""
echo "================================"
echo "All tests completed successfully!"
echo "================================"