diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 152d5d9aabf16..f114c66585342 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -146,9 +146,18 @@ There are three ways to setup an Apache Airflow development environment. # From the container pip install -e .[devel] # Run all the tests with python and mysql through tox + pip install tox tox -e py35-backend_mysql ``` + If you wish to run individual tests inside of docker enviroment you can do as follows: + + ```bash + # From the container (with your desired enviroment) with druid hook + tox -e py35-backend_mysql -- tests/hooks/test_druid_hook.py + ``` + + ### Running unit tests To run tests locally, once your unit test environment is setup (directly on your diff --git a/scripts/ci/docker-compose.yml b/scripts/ci/docker-compose.yml index 4accf119f68f2..101ad9529731e 100644 --- a/scripts/ci/docker-compose.yml +++ b/scripts/ci/docker-compose.yml @@ -66,6 +66,7 @@ services: init: true environment: - USER=airflow + - ADDITIONAL_PATH=~/.local/bin - SLUGIFY_USES_TEXT_UNIDECODE=yes - TOX_ENV - PYTHON_VERSION diff --git a/scripts/ci/run-ci.sh b/scripts/ci/run-ci.sh index 1a65bf1ef6443..f16ab5284dd44 100755 --- a/scripts/ci/run-ci.sh +++ b/scripts/ci/run-ci.sh @@ -32,8 +32,8 @@ else PIP=pip fi -sudo $PIP install --upgrade pip -sudo $PIP install tox +sudo -H $PIP install --upgrade pip +sudo -H $PIP install tox cd $AIRFLOW_ROOT && $PIP --version && tox --version