Skip to content

Commit

Permalink
Merge pull request #2256 from akvo/#2216-travis-ci-new
Browse files Browse the repository at this point in the history
[#2216] Travis CI improvements
  • Loading branch information
KasperBrandt authored Jun 21, 2016
2 parents 7486693 + 7d2931c commit 652763a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ install:

before_script:
- psql -c 'CREATE DATABASE travis_test;' -U postgres
- python manage.py migrate --noinput
- python manage.py runserver &

script:
- python manage.py test akvo.rsr.tests.iati_import
- coverage run --source=akvo manage.py test akvo.rsr.tests.iati_import
- python manage.py collectstatic --noinput
- python manage.py test --noinput akvo.rsr.tests
- coverage run --source=akvo manage.py test akvo.rsr.tests

after_success:
- coveralls
Expand Down
2 changes: 1 addition & 1 deletion akvo/rsr/tests/iati_export/test_iati_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_valid_xml(self):
self.assertNotEqual(iati_export.iati_file, '')

# Get XML string of file
tree = ElementTree.parse(iati_export.iati_file)
tree = ElementTree.parse(iati_export.iati_file.file)
root = tree.getroot()
root_tostring = ElementTree.tostring(root, encoding='utf8', method='xml')

Expand Down
3 changes: 3 additions & 0 deletions akvo/settings/80-travis.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os

if 'TRAVIS' in os.environ:
STATICFILES_STORAGE='pipeline.storage.NonPackagingPipelineStorage'
PIPELINE_ENABLED=False

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
Expand Down

0 comments on commit 652763a

Please sign in to comment.