-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 963 Bytes
/
endtoend_test.yml
File metadata and controls
41 lines (32 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: End-to-End Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Start the server
run: |
python server.py -s &
echo "Server started"
- name: Wait for server to be ready
run: sleep 5
- name: Send GET request and check response
run: |
response=$(curl -s http://localhost:5000)
echo "Response: $response"
if [ "$response" == "Hello there!" ]; then
echo "The value received is correct"
else
echo "Received value is incorrect"
exit 1
fi