Skip to content

Commit 475b5ad

Browse files
fix: make ci yml better
1 parent d8e6939 commit 475b5ad

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060
- name: Start Server and Run Tests
6161
env:
6262
EXPRESS_JS_PORT: 3000
63+
XML_RPC_PORT: 9090
64+
GRAPHQL_PORT: 4000
6365
SQL_LOCAL_CONN_URL: localhost
6466
SQL_USERNAME: root
6567
SQL_PASSWORD: mysecretpassword
@@ -71,11 +73,17 @@ jobs:
7173
PID=$!
7274
echo "Server started with PID $PID"
7375
74-
# Wait for server to be ready (swagger gen takes time)
75-
sleep 10
76+
# Wait for server to be ready (using wait-on)
77+
npx wait-on tcp:3000 --timeout 60000
7678
7779
# Run tests
7880
npm run test:vulnerabilities
81+
EXIT_CODE=$?
7982
8083
# Kill server
8184
kill $PID
85+
86+
# Display logs
87+
cat app.log
88+
89+
exit $EXIT_CODE

0 commit comments

Comments
 (0)