File tree Expand file tree Collapse file tree 1 file changed +16
-21
lines changed
Expand file tree Collapse file tree 1 file changed +16
-21
lines changed Original file line number Diff line number Diff line change 1414 mongo :
1515 image : mongo:4.4
1616 options : >-
17- --health-cmd="mongo --eval 'db.runCommand({ ping: 1 })'"
18- --health-interval=10s --health-timeout=5s --health-retries=5
17+ --health-cmd="mongo --eval 'db.runCommand({ ping:1 })'"
18+ --health-interval=10s
19+ --health-timeout=5s
20+ --health-retries=5
1921 ports :
2022 - 27017:27017
2123
@@ -26,34 +28,27 @@ jobs:
2628 - name : Set up Python
2729 uses : actions/setup-python@v4
2830 with :
29- python-version : 3.12
31+ python-version : ' 3.12'
3032
31- - name : Set up environment
33+ - name : Set up dependencies
3234 run : |
33- python -m venv venv
34- source venv/bin/activate
35- pip install --upgrade pip
35+ python -m pip install --upgrade pip
3636 pip install -r requirements.txt
3737
38- - name : Wait for MongoDB to be ready
39- run : |
40- for i in {1..10}; do
41- nc -z localhost 27017 && echo "✅ MongoDB is ready" && break
42- echo "⏳ Waiting for MongoDB..."
43- sleep 5
44- done
45-
46- - name : Install Keploy CLI
38+ - name : Download Keploy Binary
4739 run : |
4840 curl -L https://github.com/keploy/keploy/releases/latest/download/keploy-linux-amd64 -o keploy
4941 chmod +x keploy
50- ./keploy version
5142 sudo mv keploy /usr/local/bin/keploy
5243
53-
44+ - name : Wait for MongoDB
45+ run : |
46+ for i in {1..10}; do
47+ nc -z localhost 27017 && echo "Mongo is up!" && break
48+ echo "Waiting for Mongo..."
49+ sleep 5
50+ done
5451
55- - name : Run Keploy in test mode
56- env :
57- KEPLOY_MODE : test
52+ - name : Run Keploy Tests
5853 run : |
5954 keploy test -c "python flask_api_server.py" --delay 10
You can’t perform that action at this time.
0 commit comments