-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.06 KB
/
server_checks.yaml
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
42
43
44
45
46
47
48
49
50
name: Server Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies & build
env:
SAVE_CRAWLS: 0
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
CHUNK_SIZE: 50
CHUNK_LIMIT: 50
run: |
python -m venv .env
source .env/bin/activate
pip install -r requirements.txt
bash build.sh 6
- name: Local Flask server Test
env:
REMOTE_DB: 0
run: |
source .env/bin/activate
python3 server.py &
sleep 5
curl -f http://localhost:5000/
echo "Flask test completed"
- name: Test Gunicorn server
env:
REMOTE_DB: 0
run: |
source .env/bin/activate
gunicorn -w 4 server:app &
sleep 5
curl -f http://localhost:8000/
echo "Gunicorn test completed"