-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Cadasta/ci/travis-setup
Looks good: I think it's as we said about Ansible -- much better not to bother with it for Travis.
- Loading branch information
Showing
13 changed files
with
87 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[run] | ||
omit = | ||
cadasta/*/tests/* | ||
cadasta/config/* | ||
cadasta/manage.py |
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 |
---|---|---|
|
@@ -11,3 +11,7 @@ local/ | |
*.pyc | ||
.cache | ||
__pycache__/ | ||
|
||
# Coverage | ||
.coverage | ||
htmlcov |
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,18 @@ | ||
--- | ||
language: python | ||
python: | ||
- "3.4" | ||
services: | ||
- postgresql | ||
addons: | ||
postgresql: "9.4" | ||
install: | ||
- pip install -r requirements/common.txt | ||
- pip install -r requirements/dev.txt | ||
before_script: | ||
- psql template1 postgres -c 'create extension hstore;' | ||
- psql -c 'create database cadasta;' -U postgres | ||
- psql -U postgres -d cadasta -c "create extension postgis;" | ||
- python cadasta/manage.py migrate --settings=config.settings.travis | ||
script: | ||
- py.test cadasta --cov=cadasta --ds=config.settings.travis |
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
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,16 @@ | ||
from .default import * | ||
|
||
DEBUG = True | ||
|
||
# Database | ||
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.postgresql_psycopg2', | ||
'NAME': 'cadasta', | ||
'USER': 'postgres', | ||
'PASSWORD': '', | ||
'HOST': '', | ||
} | ||
} |
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,5 +1,15 @@ | ||
- name: Install packages | ||
sudo: yes | ||
apt: pkg={{ item }} state=installed update_cache=yes | ||
with_items: | ||
- python3-dev | ||
- python-virtualenv | ||
|
||
- name: Manually create the initial virtualenv | ||
command: virtualenv {{ virtualenv_path }} --python=python3 creates="{{ virtualenv_path }}" | ||
|
||
- name: Install requirements | ||
pip: virtualenv={{ virtualenv_path }} requirements={{ application_path }}/requirements/common.txt | ||
pip: virtualenv={{ virtualenv_path }} requirements={{ application_path }}requirements/common.txt | ||
|
||
- name: Django migrate | ||
django_manage: command=migrate app_path={{ application_path }}/cadasta virtualenv={{ virtualenv_path }} | ||
django_manage: command=migrate app_path={{ application_path }}cadasta virtualenv={{ virtualenv_path }} |
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,2 +1,2 @@ | ||
- name: Install requirements | ||
pip: virtualenv={{ virtualenv_path }} requirements={{ application_path }}/requirements/dev.txt | ||
pip: virtualenv={{ virtualenv_path }} requirements={{ application_path }}requirements/dev.txt |
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,8 @@ | ||
- name: Install packages | ||
sudo: yes | ||
apt: pkg={{ item }} state=installed update_cache=yes | ||
with_items: | ||
- python3 | ||
- python3-dev | ||
- python-setuptools | ||
- python-virtualenv |
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
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,2 +1,2 @@ | ||
git+git://github.com/dcramer/django-devserver.git#egg=django-devserver | ||
pytest-django | ||
pytest-cov |