diff --git a/.travis.yml b/.travis.yml index 8a0ac9a..a64cfaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ services: before_script: pip install docker-compose script: - - docker-compose run airflow sh -c "./usr/local/airflow/dags/run_unit_tests.sh" + - docker-compose run airflow sh -c "python -m pytest --show-capture=no"" diff --git a/airflow/Dockerfile b/airflow/Dockerfile index 108854b..f091b2e 100644 --- a/airflow/Dockerfile +++ b/airflow/Dockerfile @@ -2,16 +2,12 @@ FROM puckel/docker-airflow:1.10.9 WORKDIR /usr/local/airflow -RUN mkdir python-dependencies +COPY requirements.txt . -COPY ./requirements.txt python-dependencies - -RUN pip install -r python-dependencies/requirements.txt +RUN pip install -r requirements.txt ENV PYTHONPATH "${PYTHONPATH}:/usr/local/airflow/dags/modules" ENV EXECUTOR "Local" ENV AIRFLOW__SCHEDULER__MIN_FILE_PROCESS_INTERVAL "15" ENV AIRFLOW__WEBSERVER__WORKER_REFRESH_INTERVAL "450" -ENV AIRFLOW__WEBSERVER__WEB_SERVER_WORKER_TIMEOUT "150" - -COPY ./run_unit_tests.sh /usr/local/airflow/dags \ No newline at end of file +ENV AIRFLOW__WEBSERVER__WEB_SERVER_WORKER_TIMEOUT "150" \ No newline at end of file diff --git a/airflow/run_unit_tests.sh b/airflow/run_unit_tests.sh deleted file mode 100755 index a93a962..0000000 --- a/airflow/run_unit_tests.sh +++ /dev/null @@ -1,4 +0,0 @@ - -set -xe - -pytest --show-capture=no \ No newline at end of file