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 | |
Anand Doshi | 1b6c3f1 | 2015-05-28 21:46:40 -0400 | [diff] [blame] | 9 | before_install: |
| 10 | - "export DISPLAY=:99.0" |
| 11 | - "sh -e /etc/init.d/xvfb start" |
| 12 | |
Pratik Vyas | f437e86 | 2013-12-24 12:17:59 +0530 | [diff] [blame] | 13 | install: |
Anand Doshi | 3be9e26 | 2014-03-25 18:39:35 +0530 | [diff] [blame] | 14 | - sudo apt-get purge -y mysql-common |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 15 | - wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh |
Anand Doshi | 48d0a99 | 2016-04-14 18:59:11 +0530 | [diff] [blame] | 16 | - sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis --bench-branch develop |
Pratik Vyas | 6814a39 | 2015-04-21 19:19:34 +0530 | [diff] [blame] | 17 | - sudo pip install --upgrade pip |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 18 | - rm $TRAVIS_BUILD_DIR/.git/shallow |
Anand Doshi | 6677fd5 | 2016-04-07 18:19:56 +0530 | [diff] [blame] | 19 | - bash $TRAVIS_BUILD_DIR/travis/bench_init.sh |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 20 | - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/ |
Pratik Vyas | 8668081 | 2014-10-12 19:35:46 +0530 | [diff] [blame] | 21 | |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 22 | script: |
| 23 | - cd ~/frappe-bench |
| 24 | - bench get-app erpnext $TRAVIS_BUILD_DIR |
Pratik Vyas | 52d3697 | 2015-03-31 13:11:32 +0530 | [diff] [blame] | 25 | - bench use test_site |
Pratik Vyas | 4ce7977 | 2015-03-31 13:16:29 +0530 | [diff] [blame] | 26 | - bench reinstall |
Anand Doshi | d726ce5 | 2015-08-17 15:13:58 +0530 | [diff] [blame] | 27 | - bench build |
Anand Doshi | d726ce5 | 2015-08-17 15:13:58 +0530 | [diff] [blame] | 28 | - bench start & |
Anand Doshi | 1b6c3f1 | 2015-05-28 21:46:40 -0400 | [diff] [blame] | 29 | - sleep 10 |
| 30 | - bench --verbose run-tests --driver Firefox |
Pratik Vyas | f437e86 | 2013-12-24 12:17:59 +0530 | [diff] [blame] | 31 | |
Anand Doshi | c5dbf0f | 2014-06-18 13:35:37 +0530 | [diff] [blame] | 32 | before_script: |
| 33 | - mysql -e 'create database test_frappe' |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 34 | - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis |
| 35 | - 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] | 36 | |
Pratik Vyas | a7b7e62 | 2015-04-16 10:45:03 +0530 | [diff] [blame] | 37 | notifications: |
| 38 | webhooks: |
| 39 | urls: |
| 40 | - https://webhooks.gitter.im/e/92b3bea86d8c5397beef |
Anand Doshi | 1b6c3f1 | 2015-05-28 21:46:40 -0400 | [diff] [blame] | 41 | on_success: always |
| 42 | on_failure: always |
Pratik Vyas | 6814a39 | 2015-04-21 19:19:34 +0530 | [diff] [blame] | 43 | on_start: never |