-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.28 KB
/
Copy pathkeploy.yml
File metadata and controls
54 lines (45 loc) · 1.28 KB
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
51
52
53
54
name: Keploy API Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
run-keploy-tests:
runs-on: ubuntu-latest
services:
mongo:
image: mongo:4.4
options: >-
--health-cmd="mongo --eval 'db.runCommand({ ping:1 })'"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 27017:27017
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Set up dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Download Keploy Binary
run: |
curl -L https://github.com/keploy/keploy/releases/latest/download/keploy-linux-amd64 -o keploy
chmod +x keploy
sudo mv keploy /usr/local/bin/keploy
- name: Wait for MongoDB
run: |
for i in {1..10}; do
nc -z localhost 27017 && echo "Mongo is up!" && break
echo "Waiting for Mongo..."
sleep 5
done
- name: Run Keploy Tests
run: |
keploy test -c "python flask_api_server.py" --delay 10