-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop_v4' of github.com:inasafe/inasafe-django into d…
…evelop
- Loading branch information
Showing
195 changed files
with
65,310 additions
and
1,072 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,73 @@ | ||
sudo: required | ||
|
||
language: python | ||
|
||
services: | ||
- postgresql | ||
- docker | ||
|
||
env: | ||
global: | ||
- DATABASE_URL='postgres://postgres:@localhost:5432/test_db' | ||
- SECRET_KEY='tT\xd7\xb06\xf7\x9b\xff\x0fZL\xca\xca\x11\xefM\xacr\xfb\xdf\xca\x9b' | ||
- DJANGO_SETTINGS_MODULE=core.settings.test_travis | ||
- ON_TRAVIS=True | ||
matrix: | ||
- INTEGRATION_TEST=False | ||
- INTEGRATION_TEST=True | ||
|
||
virtualenv: | ||
system_site_packages: true | ||
|
||
python: | ||
- '2.7' | ||
|
||
addons: | ||
postgresql: "9.3" | ||
apt: | ||
packages: | ||
- postgresql-9.3-postgis-2.3 | ||
|
||
install: | ||
- pip install coveralls | ||
- pip install -r REQUIREMENTS-dev.txt | ||
|
||
|
||
before_script: | ||
- psql -c 'create database test_db;' -U postgres | ||
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d test_db | ||
- cd django_project | ||
- sudo apt install zip wget | ||
- pip install -r REQUIREMENTS-TRAVIS.txt | ||
- pushd deployment | ||
- cp ansible/development/group_vars/all.travis.yml ansible/development/group_vars/all.yml | ||
- make setup-ansible ANSIBLE_ARGS="--extra-vars='ansible_sudo_pass=\"\"' --extra-vars='pycharm_version=\"\"' --skip-tags=development" | ||
- make build | ||
- make pull-external-services | ||
- make up | ||
- make status | ||
- mkdir -p headless-data/qgis-templates | ||
- mkdir -p headless-data/contexts | ||
# Retrieve latest templates | ||
- sudo git clone https://github.com/inasafe/inasafe-realtime-resources.git headless-data/qgis-templates | ||
- cat docker-compose.override.yml | ||
- until make migrate; do echo "Retrying"; sleep 5; done | ||
- popd | ||
|
||
script: | ||
- flake8 | ||
# Split this, because somehow test failed when using: | ||
# coverage run manage.py test | ||
- coverage run manage.py test realtime | ||
- coverage run manage.py test user_map | ||
- pushd deployment | ||
- make check-flake8 | ||
- if [ "$INTEGRATION_TEST" = "False" ]; then make coverage-tests; fi | ||
# Do integration tests | ||
- make inasafe-worker-stop | ||
- make realtime-worker | ||
- make headless-worker | ||
- sleep 30 | ||
# Retrieve analysis context data | ||
- if [ "$INTEGRATION_TEST" = "True" ]; then make retrieve-context-data; fi | ||
- if [ "$INTEGRATION_TEST" = "True" ]; then make integration-tests; fi | ||
- popd | ||
|
||
after_script: | ||
# Clean up | ||
- pushd deployment | ||
- make down | ||
- popd | ||
|
||
after_success: | ||
- coveralls | ||
- pushd django_project | ||
- coverage combine | ||
# Fix path (codecov.yml doesn't work) | ||
# Replace parent directory to travis directory, because we are running | ||
# coverage using docker mount | ||
- sed -i 's/home\/web\/django_project/home\/travis\/build\/inasafe\/inasafe-django\/django_project/g' .coverage | ||
- cat .coverage | ||
- codecov | ||
- cat coverage.xml | ||
- popd | ||
|
||
email: | ||
- tim@kartoza.com | ||
- lana.pcfre@gmail.com | ||
- imajimatika@gmail.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ansible | ||
codecov | ||
flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.