update working

This commit is contained in:
leehk 2025-04-17 12:43:11 +08:00
parent a1cb3732ba
commit 48695c964a
2 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
name: Build
name: Build + CI
# Triggers: Equivalent to ADO trigger block
on:

View File

@ -11,6 +11,8 @@ WORKDIR /usr/src/app
# set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV ENVIRONMENT=dev
ENV TESTING=1
# install python dependencies
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv && rm -rf ~/.cache/pip
@ -20,10 +22,9 @@ RUN pipenv install --deploy --dev
# add app
COPY . /usr/src/app
RUN pipenv run pytest tests --disable-warnings
# RUN pipenv run pip install black==23.12.1 flake8==7.0.0 isort==5.13.2
# RUN pipenv run flake8 .
# RUN pipenv run black --exclude=migrations . --check
# RUN pipenv run isort . --check-only
RUN pipenv run flake8 .
RUN pipenv run black --exclude=migrations . --check
RUN pipenv run isort . --check-only
#########
# FINAL #
@ -54,6 +55,7 @@ ENV TESTING=0
# install python dependencies
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv && rm -rf ~/.cache/pip
COPY --from=builder /usr/src/app/Pipfile .
RUN pipenv install --deploy
RUN pipenv run pip install "uvicorn[standard]==0.26.0"