run on host directly

This commit is contained in:
leehk 2025-04-13 18:22:38 +08:00
parent 1b7f9cebdc
commit d2b85fb428
2 changed files with 7 additions and 2 deletions

View File

@ -114,12 +114,15 @@ jobs:
-e TESTING=0 \
-p 8004:8765 \
--memory="4g" \
--memory-swap="5g" \
--memory-swap="8g" \
${{ env.IMAGE }}:latest
- name: Monitor memory usage
run: free -h
- name: Run Pytest directly
run: |
cd ./app/backend/ && pipenv install && pipenv run python -m pytest --disable-warnings
- name: Pytest
run: docker exec backend pipenv run python -m pytest tests --disable-warnings
run: docker exec backend pipenv run python -m pytest -v
# - name: Flake8
# run: docker exec backend pipenv run python -m flake8 .
# - name: Black

View File

@ -77,6 +77,8 @@ 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