Merge pull request #30 from aimingmed/feature/backend-frontend-structure

merged the changes
This commit is contained in:
Hong Kai LEE 2025-04-14 15:34:30 +08:00 committed by GitHub
commit 4dd6f84116
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 11 deletions

View File

@ -127,19 +127,14 @@ jobs:
- name: Get container logs
if: failure()
run: docker logs backend-backend
# - 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: Pytest
run: docker exec backend-backend pipenv run python -m pytest .
# - name: Flake8
# run: docker exec backend-backend pipenv run python -m flake8 .
# - name: Black
# run: docker exec backend-backend pipenv run python -m black . --check
- name: isort
if: always()
run: docker exec backend-backend pipenv run python -m isort . --check-only
- name: Cleanup container at end of job
if: always()

View File

@ -77,8 +77,5 @@ RUN chown -R app:app $APP_HOME
# change to the app user
USER app
# pytest
RUN pipenv run pytest --disable-warnings -v
# run gunicorn
CMD pipenv run gunicorn --bind 0.0.0.0:$PORT backend.main:app -k uvicorn.workers.UvicornWorker