Skip to content

Commit

Permalink
Add check server
Browse files Browse the repository at this point in the history
  • Loading branch information
JN-Hernandez committed May 14, 2024
1 parent aee54ae commit e2505f4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
compile-then-run-tests:
name: Compile scala then run server
name: Compile scala, run server, run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -40,10 +40,15 @@ jobs:
./scripts/server >/dev/null 2>&1 &
echo "SERVER_PID=$!" >> "$GITHUB_ENV"
- name: Run test script
- name: Check server
run: |
sleep 15
curl localhost:8090/pong
if ps -p "${SERVER_PID}" > /dev/null; then
echo "Server script is running with PID: ${SERVER_PID}"
else
echo "Server script is not running."
exit 1
fi
curl localhost:8090/ping
- name: Stop server
run: |
Expand Down

0 comments on commit e2505f4

Please sign in to comment.