Skip to content

Commit

Permalink
Updated travis conf
Browse files Browse the repository at this point in the history
  • Loading branch information
jssuzanne committed Mar 15, 2019
1 parent 7c961b3 commit 2c11752
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ env:


script: script:
- flake8 anyblok - flake8 anyblok
- python3 update_env.py
- psql -c 'create database travis_ci_test;' -U postgres - psql -c 'create database travis_ci_test;' -U postgres
- nosetests anyblok/tests -v -s --with-coverage --cover-package=anyblok - nosetests anyblok/tests -v -s --with-coverage --cover-package=anyblok
- psql -c 'drop database travis_ci_test;' -U postgres - psql -c 'drop database travis_ci_test;' -U postgres
Expand Down
13 changes: 13 additions & 0 deletions update_env.py
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env python3

import os
import platform

py_impl = platform.python_implementation()

if (
os.environ.get('ANYBLOK_DATABASE_DRIVER', 'postgresql') == 'postgresql' and
py_impl == 'PyPy'
):
driver = 'postgresql+psycopg2cffi'
os.environ.update(ANYBLOK_DATABASE_DRIVER=driver)

0 comments on commit 2c11752

Please sign in to comment.