From e8c99e60127d77688877872abdfbed32c7079c47 Mon Sep 17 00:00:00 2001 From: Maxime Alves LIRMM Date: Thu, 17 Mar 2022 17:38:20 +0100 Subject: [PATCH] [ci/cd] install pytest in docker image, run pytest at launch --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 05f2b99..ea04b12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,9 @@ COPY . /halfapi WORKDIR /halfapi RUN apt-get update > /dev/null && apt-get -y install git > /dev/null 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