.travis.yml 1.1 KB

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