Skip to content

Commit

Permalink
add server test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-Sagaydak committed Apr 27, 2024
1 parent 840a6e6 commit ffb0759
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:

build:
build-test:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -39,4 +39,23 @@ jobs:
run: echo "6" | libhv-client

- name: Test 3. Install server
run: sudo dpkg -i ./server/http-server.deb
run: sudo dpkg -i ./server/http-server.deb

- name: Test 4. Test server
run: |
libhv-http
SERVER_PID=$!
sleep 5
curl --silent --head http://localhost:7777 | grep "HTTP/1.1 200 OK" > /dev/null
if [ "$?" -eq 0 ]; then
echo "Сервер успешно запущен"
kill $SERVER_PID
exit 0
else
echo "Ошибка при запуске сервера"
kill $SERVER_PID
exit 1
fi

0 comments on commit ffb0759

Please sign in to comment.