Pratik Vyas | cc9bc95 | 2014-02-06 14:59:05 +0530 | [diff] [blame] | 1 | language: python |
Pratik Vyas | f437e86 | 2013-12-24 12:17:59 +0530 | [diff] [blame] | 2 | |
| 3 | python: |
| 4 | - "2.7" |
| 5 | |
| 6 | services: |
| 7 | - mysql |
| 8 | |
| 9 | install: |
Anand Doshi | 3be9e26 | 2014-03-25 18:39:35 +0530 | [diff] [blame] | 10 | - sudo apt-get purge -y mysql-common |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 11 | - 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 Vyas | f2eed44 | 2015-03-23 16:23:28 +0530 | [diff] [blame] | 15 | - cd ~/ && bench init frappe-bench --frappe-path https://github.com/frappe/frappe.git --frappe-branch develop |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 16 | - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/ |
Pratik Vyas | 8668081 | 2014-10-12 19:35:46 +0530 | [diff] [blame] | 17 | |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 18 | script: |
| 19 | - cd ~/frappe-bench |
| 20 | - bench get-app erpnext $TRAVIS_BUILD_DIR |
Pratik Vyas | 52d3697 | 2015-03-31 13:11:32 +0530 | [diff] [blame] | 21 | - bench use test_site |
Pratik Vyas | 4ce7977 | 2015-03-31 13:16:29 +0530 | [diff] [blame] | 22 | - bench reinstall |
| 23 | - bench build-website |
| 24 | - bench --verbose run-tests |
Pratik Vyas | f437e86 | 2013-12-24 12:17:59 +0530 | [diff] [blame] | 25 | |
Anand Doshi | c5dbf0f | 2014-06-18 13:35:37 +0530 | [diff] [blame] | 26 | before_script: |
| 27 | - mysql -e 'create database test_frappe' |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 28 | - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis |
| 29 | - echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis |
Anand Doshi | c5dbf0f | 2014-06-18 13:35:37 +0530 | [diff] [blame] | 30 | |