Skip to content

Commit

Permalink
[AIRFLOW-3100][AIRFLOW-3101] Improve docker compose local testing (ap…
Browse files Browse the repository at this point in the history
  • Loading branch information
holdenk authored and odracci committed Jan 6, 2019
1 parent 4de3d01 commit 46360f1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ services:
init: true
environment:
- USER=airflow
- ADDITIONAL_PATH=~/.local/bin
- SLUGIFY_USES_TEXT_UNIDECODE=yes
- TOX_ENV
- PYTHON_VERSION
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/run-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ else
PIP=pip2
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

Expand Down

0 comments on commit 46360f1

Please sign in to comment.