[ci/cd] install pytest in docker image, run pytest at launch

This commit is contained in:
Maxime Alves LIRMM 2022-03-17 17:38:20 +01:00
parent 568aea9ea8
commit e8c99e6012
1 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,9 @@ COPY . /halfapi
WORKDIR /halfapi WORKDIR /halfapi
RUN apt-get update > /dev/null && apt-get -y install git > /dev/null RUN apt-get update > /dev/null && apt-get -y install git > /dev/null
RUN pip install gunicorn uvicorn RUN pip install gunicorn uvicorn
RUN pip install . # Install package with extra_requires for testing
RUN pip install ".[tests]"
ENV PYTHONPATH=./tests
RUN pytest
CMD gunicorn halfapi.app CMD gunicorn halfapi.app