debug #16
This file contains 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: CI Pipeline | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install locust | |
- name: Start Flask service | |
run: | | |
nohup python src/app.py & | |
env: | |
FLASK_ENV: development | |
- name: Run load tests | |
run: | | |
locust -f src/load_test.py --headless -u 100 -r 10 --run-time 1m --host http://localhost:5000 |