.travis.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. language: python
  2. python:
  3. - 2.7
  4. - 3.4
  5. - 3.5
  6. services:
  7. - mongodb
  8. before_script:
  9. - psql -c "CREATE USER tester WITH PASSWORD '123456';" -U postgres
  10. - psql -c 'create database pwman;' -U postgres
  11. - psql -c 'grant ALL ON DATABASE pwman to tester' -U postgres
  12. - mysql -e 'create database pwmantest' -uroot
  13. - mysql -e "create user 'pwman'@'localhost' IDENTIFIED BY '123456'" -uroot
  14. - mysql -e "grant all on pwmantest.* to 'pwman'@'localhost';" -uroot
  15. - mongo pwmantest --eval 'db.addUser("tester", "12345678");'
  16. before_install:
  17. - sudo apt-get update -qq
  18. - sudo apt-get install python-psycopg2 python3-psycopg2
  19. - sudo apt-get install python-mysqldb
  20. # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
  21. install:
  22. - "pip install pymongo==2.8"
  23. - "pip install pymysql"
  24. - "pip install -r requirements.txt -r test_requirements.txt"
  25. - "pip install coveralls"
  26. - "pip install ."
  27. # command to run tests, e.g. python setup.py test
  28. script:
  29. python setup.py develop && coverage run --source=pwman setup.py test
  30. after_success:
  31. coveralls