Skip to content

Commit 57b9ac2

Browse files
committed
make the tests share the server
1 parent 99be21c commit 57b9ac2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/validate.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,25 @@ jobs:
5656
- name: 📦 Install dependencies
5757
run: npm ci
5858

59+
- name: 🚀 Start app server
60+
run: |
61+
npm run dev --silent --prefix ./epicshop/epic-me -- --clearScreen=false --logLevel=error --strictPort &
62+
echo $! > /tmp/app-server.pid
63+
# Wait for server to be ready
64+
timeout 30 bash -c 'until curl -f http://localhost:7787/healthcheck >/dev/null 2>&1; do sleep 1; done'
65+
5966
- name: 🧪 Run tests
6067
id: run_tests
6168
run: node ./epicshop/test.js ..s
6269

70+
- name: 🛑 Stop app server
71+
if: always()
72+
run: |
73+
if [ -f /tmp/app-server.pid ]; then
74+
kill $(cat /tmp/app-server.pid) 2>/dev/null || true
75+
rm -f /tmp/app-server.pid
76+
fi
77+
6378
deploy:
6479
name: 🚀 Deploy
6580
timeout-minutes: 10

0 commit comments

Comments
 (0)