fix: rename phantom.py flask app to server.py #1
Workflow file for this run
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: Gunicorn Test | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m venv .env | |
source .env/bin/activate | |
pip install -r requirements.txt | |
- name: test search Engine server | |
run: | | |
source .env/bin/activate | |
python3 phantom.py & | |
sleep 10 | |
curl -f http://localhost:5000/ | |
echo "Flask test completed" | |
- name: Test Gunicorn server | |
run: | | |
source .env/bin/activate | |
gunicorn -w 4 phantom:app | |
sleep 10 | |
curl -f http://localhost:8000/ | |
echo "Gunicorn test completed" | |