blob: 0cb709046ec37c699fd328289cbb9426f393ddce [file] [log] [blame]
Pratik Vyascc9bc952014-02-06 14:59:05 +05301language: python
Pratik Vyasf437e862013-12-24 12:17:59 +05302
3python:
4 - "2.7"
5
6services:
7 - mysql
8
9install:
Anand Doshi3be9e262014-03-25 18:39:35 +053010 - sudo apt-get purge -y mysql-common
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053011 - wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
12 - sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis
13 - sudo service redis-server start
14 - rm $TRAVIS_BUILD_DIR/.git/shallow
Pratik Vyas4ab09fa2015-01-19 14:36:32 +053015 - cd ~/ && bench init frappe-bench --frappe-path https://github.com/frappe/frappe.git --frappe-branch v5.0
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053016 - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
Pratik Vyas86680812014-10-12 19:35:46 +053017
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053018script:
19 - cd ~/frappe-bench
20 - bench get-app erpnext $TRAVIS_BUILD_DIR
21 - bench set-default-site test_site
22 - bench frappe --reinstall
23 - bench frappe --build_website
24 - bench frappe --serve_test &
25 - bench frappe --verbose --run_tests
Pratik Vyasf437e862013-12-24 12:17:59 +053026
Anand Doshic5dbf0f2014-06-18 13:35:37 +053027before_script:
28 - mysql -e 'create database test_frappe'
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053029 - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis
30 - echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis
Anand Doshic5dbf0f2014-06-18 13:35:37 +053031