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