blob: 9cad59fcc6499a0b2e228158e03be5281fee9d82 [file] [log] [blame]
Pratik Vyascc9bc952014-02-06 14:59:05 +05301language: python
shreyas60e9f842016-07-29 19:39:49 +05302dist: trusty
Pratik Vyasf437e862013-12-24 12:17:59 +05303
4python:
5 - "2.7"
6
7services:
8 - mysql
9
Anand Doshi1b6c3f12015-05-28 21:46:40 -040010before_install:
11 - "export DISPLAY=:99.0"
12 - "sh -e /etc/init.d/xvfb start"
13
Pratik Vyasf437e862013-12-24 12:17:59 +053014install:
shreyas60e9f842016-07-29 19:39:49 +053015 - sudo apt-get purge -y mysql-common mysql-server mysql-client
16 # - wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
17 # - sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis --bench-branch develop
18 - wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
19 - sudo python install.py --develop --user travis --without-bench-setup
20 - sudo pip install -e ~/bench
21
22 # - sudo pip install --upgrade pip
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053023 - rm $TRAVIS_BUILD_DIR/.git/shallow
Anand Doshi6677fd52016-04-07 18:19:56 +053024 - bash $TRAVIS_BUILD_DIR/travis/bench_init.sh
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053025 - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
Pratik Vyas86680812014-10-12 19:35:46 +053026
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053027script:
28 - cd ~/frappe-bench
29 - bench get-app erpnext $TRAVIS_BUILD_DIR
Pratik Vyas52d36972015-03-31 13:11:32 +053030 - bench use test_site
Rushabh Mehtacc887902016-07-24 22:45:09 +053031 - bench reinstall --yes
Anand Doshid726ce52015-08-17 15:13:58 +053032 - bench build
Anand Doshid726ce52015-08-17 15:13:58 +053033 - bench start &
Anand Doshi1b6c3f12015-05-28 21:46:40 -040034 - sleep 10
35 - bench --verbose run-tests --driver Firefox
Pratik Vyasf437e862013-12-24 12:17:59 +053036
Anand Doshic5dbf0f2014-06-18 13:35:37 +053037before_script:
shreyas60e9f842016-07-29 19:39:49 +053038 - mysql -u root -ptravis -e 'create database test_frappe'
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053039 - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis
40 - 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 +053041
Pratik Vyasa7b7e622015-04-16 10:45:03 +053042notifications:
43 webhooks:
44 urls:
45 - https://webhooks.gitter.im/e/92b3bea86d8c5397beef
Anand Doshi1b6c3f12015-05-28 21:46:40 -040046 on_success: always
47 on_failure: always
Pratik Vyas6814a392015-04-21 19:19:34 +053048 on_start: never