diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c4e827c34..eddde7883 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,8 @@ stages: test_api: stage: test script: - - ./api/runtests + - docker-compose -f api/test.yml build + - docker-compose -f api/test.yml run test tags: - dind diff --git a/api/docker/Dockerfile.test b/api/docker/Dockerfile.test index 0d8224879..652470c1e 100644 --- a/api/docker/Dockerfile.test +++ b/api/docker/Dockerfile.test @@ -1,12 +1,13 @@ FROM python:3.5 ENV PYTHONUNBUFFERED 1 +ENV PYTHONDONTWRITEBYTECODE 1 # Requirements have to be pulled and installed here, otherwise caching won't work COPY ./requirements.apt /requirements.apt COPY ./install_os_dependencies.sh /install_os_dependencies.sh RUN bash install_os_dependencies.sh install - +RUN apt-get install py3clean RUN mkdir /requirements COPY ./requirements/base.txt /requirements diff --git a/api/test.yml b/api/test.yml index dc50a9b54..e95461a72 100644 --- a/api/test.yml +++ b/api/test.yml @@ -1,7 +1,7 @@ test: dockerfile: docker/Dockerfile.test build: . - command: python manage.py test + entrypoint: python manage.py test volumes: - .:/app environment: