You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
1.2 KiB

  1. language: python
  2. dist: trusty
  3. python:
  4. - "2.7"
  5. addons:
  6. apt:
  7. sources:
  8. - google-chrome
  9. packages:
  10. - google-chrome-stable
  11. services:
  12. - mysql
  13. before_install:
  14. - export DISPLAY=:99.0
  15. - sh -e /etc/init.d/xvfb start
  16. install:
  17. - sudo apt-get purge -y mysql-common mysql-server mysql-client
  18. - nvm install v7.10.0
  19. - wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
  20. - sudo python install.py --develop --user travis --without-bench-setup
  21. - sudo pip install -e ~/bench
  22. - rm $TRAVIS_BUILD_DIR/.git/shallow
  23. - cd ~/ && bench init frappe-bench --frappe-path $TRAVIS_BUILD_DIR
  24. - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
  25. before_script:
  26. - mysql -u root -ptravis -e 'create database test_frappe'
  27. - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis
  28. - echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis
  29. - cd ~/frappe-bench
  30. - bench use test_site
  31. - bench reinstall --yes
  32. - bench start &
  33. - sleep 10
  34. script:
  35. - set -e
  36. - bench --verbose run-tests
  37. - bench reinstall --yes
  38. - bench run-ui-tests --ci