File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,34 +14,43 @@ jobs:
1414 mongo :
1515 image : mongo:4.4
1616 options : >-
17- --health-cmd="mongo --eval 'db.runCommand({ ping:1 })'"
17+ --health-cmd="mongo --eval 'db.runCommand({ ping: 1 })'"
1818 --health-interval=10s --health-timeout=5s --health-retries=5
19- --name mongo
19+ ports :
20+ - 27017:27017
2021
2122 steps :
22- - name : Checkout
23+ - name : Checkout code
2324 uses : actions/checkout@v3
2425
25- - name : Setup Node.js
26- uses : actions/setup-node@v3
26+ - name : Set up Python
27+ uses : actions/setup-python@v4
2728 with :
28- node -version : ' 18 '
29+ python -version : 3.12
2930
30- - name : Install dependencies
31- run : npm install
32- working-directory : ./bookvault-api
31+ - name : Set up environment
32+ run : |
33+ python -m venv venv
34+ source venv/bin/activate
35+ pip install --upgrade pip
36+ pip install -r requirements.txt
3337
3438 - name : Wait for MongoDB to be ready
3539 run : |
3640 for i in {1..10}; do
37- nc -z localhost 27017 && echo "Mongo is up " && break
38- echo "Waiting for Mongo ..."
41+ nc -z localhost 27017 && echo "✅ MongoDB is ready " && break
42+ echo "⏳ Waiting for MongoDB ..."
3943 sleep 5
4044 done
4145
42- - name : Install Keploy
46+ - name : Download Keploy CLI
4347 run : |
4448 curl -L https://github.com/keploy/keploy/releases/latest/download/keploy-linux-amd64 -o keploy
4549 chmod +x keploy
4650 sudo mv keploy /usr/local/bin/keploy
4751
52+ - name : Run Keploy in test mode
53+ env :
54+ KEPLOY_MODE : test
55+ run : |
56+ keploy test -c "python flask_api_server.py" --delay 10
You can’t perform that action at this time.
0 commit comments