CICD #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| --name mongo | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Download and install Keploy | |
| run: | | |
| curl -L https://github.com/keploy/keploy/releases/download/v0.2.7/keploy-linux-amd64 -o keploy | |
| chmod +x keploy | |
| sudo mv keploy /usr/local/bin/keploy | |
| - name: Run Keploy test | |
| run: | | |
| keploy test -c "python flask_api_server.py" --delay 10 |