Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIRFLOW-3100][AIRFLOW-3101] Improve docker compose local testing #3933

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -66,6 +66,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 @@ -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

Expand Down