This commit is contained in:
leehk 2025-04-13 21:38:17 +08:00
parent 41e49d9b48
commit c7848cc8ec
2 changed files with 9 additions and 9 deletions

View File

@ -116,12 +116,12 @@ jobs:
${{ env.IMAGE }}:latest
- name: Monitor memory usage
run: free -h
- name: Run Pytest directly
run: |
# install python 3.11 and pip3
sudo apt-get update
sudo apt-get install -y python3.11 python3.11-distutils
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv && cd ./app/backend/ && pipenv install && pipenv run python -m pytest --disable-warnings
# - name: Run Pytest directly
# run: |
# # install python 3.11 and pip3
# sudo apt-get update
# sudo apt-get install -y python3.11 python3.11-distutils
# pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv && cd ./app/backend/ && pipenv install && pipenv run python -m pytest --disable-warnings
- name: Pytest
run: docker exec backend-backend pipenv run python -m pytest -v
# - name: Flake8

View File

@ -11,7 +11,7 @@ from api import ping, chatbot
log = logging.getLogger("uvicorn")
origins = ["http://localhost:3000"]
origins = ["http://localhost:8004"]
def create_application() -> FastAPI:
application = FastAPI()
@ -32,5 +32,5 @@ app.add_middleware(
)
if __name__ == "__main__":
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)
# if __name__ == "__main__":
# uvicorn.run("main:app", host="0.0.0.0", port=8765, reload=True)