blob: 8f2febd53e1543d57d8eff9516be4a32f36a1a39 [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
Makarand Bauskar0b8f9202017-06-01 18:56:39 +053016 - nvm install v7.10.0
shreyas60e9f842016-07-29 19:39:49 +053017 # - 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 Vyas2a47eeb2015-01-01 15:48:04 +053024 - rm $TRAVIS_BUILD_DIR/.git/shallow
Anand Doshi6677fd52016-04-07 18:19:56 +053025 - bash $TRAVIS_BUILD_DIR/travis/bench_init.sh
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053026 - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
Pratik Vyas86680812014-10-12 19:35:46 +053027
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053028script:
29 - cd ~/frappe-bench
30 - bench get-app erpnext $TRAVIS_BUILD_DIR
Pratik Vyas52d36972015-03-31 13:11:32 +053031 - bench use test_site
Rushabh Mehtacc887902016-07-24 22:45:09 +053032 - bench reinstall --yes
Anand Doshid726ce52015-08-17 15:13:58 +053033 - bench build
Anand Doshid726ce52015-08-17 15:13:58 +053034 - bench start &
Anand Doshi1b6c3f12015-05-28 21:46:40 -040035 - sleep 10
36 - bench --verbose run-tests --driver Firefox
Pratik Vyasf437e862013-12-24 12:17:59 +053037
Anand Doshic5dbf0f2014-06-18 13:35:37 +053038before_script:
shreyas60e9f842016-07-29 19:39:49 +053039 - mysql -u root -ptravis -e 'create database test_frappe'
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053040 - 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 Doshic5dbf0f2014-06-18 13:35:37 +053042
Pratik Vyasa7b7e622015-04-16 10:45:03 +053043notifications:
44 webhooks:
45 urls:
46 - https://webhooks.gitter.im/e/92b3bea86d8c5397beef
Anand Doshi1b6c3f12015-05-28 21:46:40 -040047 on_success: always
48 on_failure: always
Pratik Vyas6814a392015-04-21 19:19:34 +053049 on_start: never