airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] kaxil closed pull request #3933: [AIRFLOW-3100][AIRFLOW-3101] Improve docker compose local testing
Date Thu, 27 Sep 2018 22:26:05 GMT
kaxil closed pull request #3933: [AIRFLOW-3100][AIRFLOW-3101] Improve docker compose local
testing
URL: https://github.com/apache/incubator-airflow/pull/3933
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 152d5d9aab..f114c66585 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 4accf119f6..101ad95297 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 1a65bf1ef6..f16ab5284d 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
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message