Skip to content

Commit

Permalink
Update quotes-api.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SanskritiHarmukh authored Sep 22, 2024
1 parent 96f7bb9 commit 5adbe73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/quotes-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
- name: Start the server
run: |
nohup npm start & # Start the server in the background
nohup npm start &
echo $! > server.pid # Save the PID of the server
sleep 10 # Wait for the server to start
- name: Wait for server to be ready
Expand All @@ -50,4 +51,6 @@ jobs:
hopp test -e exports/quotes.json exports/quotes-demo.json
- name: Stop the server
run: kill $(jobs -p) # Stop the server after tests
run: |
kill $(cat server.pid) # Stop the server using the saved PID
rm server.pid

0 comments on commit 5adbe73

Please sign in to comment.