blob: f6c4eeecd9156bee71cd57747842157a6bfaff3a [file] [log] [blame]
Pratik Vyascc9bc952014-02-06 14:59:05 +05301language: python
Pratik Vyasf437e862013-12-24 12:17:59 +05302
3python:
4 - "2.7"
5
6services:
7 - mysql
8
Anand Doshi1b6c3f12015-05-28 21:46:40 -04009before_install:
10 - "export DISPLAY=:99.0"
11 - "sh -e /etc/init.d/xvfb start"
12
Pratik Vyasf437e862013-12-24 12:17:59 +053013install:
Anand Doshi3be9e262014-03-25 18:39:35 +053014 - sudo apt-get purge -y mysql-common
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053015 - wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
16 - sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis
Pratik Vyas6814a392015-04-21 19:19:34 +053017 - sudo pip install --upgrade pip
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053018 - sudo service redis-server start
19 - rm $TRAVIS_BUILD_DIR/.git/shallow
Pratik Vyasf2eed442015-03-23 16:23:28 +053020 - cd ~/ && bench init frappe-bench --frappe-path https://github.com/frappe/frappe.git --frappe-branch develop
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053021 - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
Pratik Vyas86680812014-10-12 19:35:46 +053022
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053023script:
24 - cd ~/frappe-bench
25 - bench get-app erpnext $TRAVIS_BUILD_DIR
Pratik Vyas52d36972015-03-31 13:11:32 +053026 - bench use test_site
Pratik Vyas4ce79772015-03-31 13:16:29 +053027 - bench reinstall
28 - bench build-website
Anand Doshi1b6c3f12015-05-28 21:46:40 -040029 - bench serve &
30 - sleep 10
31 - bench --verbose run-tests --driver Firefox
Pratik Vyasf437e862013-12-24 12:17:59 +053032
Anand Doshic5dbf0f2014-06-18 13:35:37 +053033before_script:
34 - mysql -e 'create database test_frappe'
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053035 - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis
36 - 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 +053037
Pratik Vyasa7b7e622015-04-16 10:45:03 +053038notifications:
39 webhooks:
40 urls:
41 - https://webhooks.gitter.im/e/92b3bea86d8c5397beef
Anand Doshi1b6c3f12015-05-28 21:46:40 -040042 on_success: always
43 on_failure: always
Pratik Vyas6814a392015-04-21 19:19:34 +053044 on_start: never