blob: a70062fea3a99093707bd63057c6b7d154cdcaca [file] [log] [blame]
Pratik Vyascc9bc952014-02-06 14:59:05 +05301language: python
shreyas60e9f842016-07-29 19:39:49 +05302dist: trusty
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +05303
4addons:
5 apt:
6 sources:
7 - google-chrome
8 packages:
9 - google-chrome-stable
Pratik Vyasf437e862013-12-24 12:17:59 +053010
11python:
12 - "2.7"
13
14services:
15 - mysql
16
17install:
Rushabh Mehta26538252017-07-28 11:37:45 +053018 - pip install flake8==3.3.0
19 - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053020 - sudo rm /etc/apt/sources.list.d/docker.list
shreyas60e9f842016-07-29 19:39:49 +053021 - sudo apt-get purge -y mysql-common mysql-server mysql-client
Makarand Bauskar0b8f9202017-06-01 18:56:39 +053022 - nvm install v7.10.0
shreyas60e9f842016-07-29 19:39:49 +053023 - wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
24 - sudo python install.py --develop --user travis --without-bench-setup
25 - sudo pip install -e ~/bench
26
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053027 - rm $TRAVIS_BUILD_DIR/.git/shallow
Anand Doshi6677fd52016-04-07 18:19:56 +053028 - bash $TRAVIS_BUILD_DIR/travis/bench_init.sh
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053029 - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
Pratik Vyas86680812014-10-12 19:35:46 +053030
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053031before_script:
32 - wget http://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip
33 - unzip chromedriver_linux64.zip
34 - sudo apt-get install libnss3
35 - sudo apt-get --only-upgrade install google-chrome-stable
36 - sudo cp chromedriver /usr/local/bin/.
37 - sudo chmod +x /usr/local/bin/chromedriver
38 - export DISPLAY=:99.0
39 - sh -e /etc/init.d/xvfb start
40 - sleep 3
41 - mysql -u root -ptravis -e 'create database test_frappe'
42 - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis
43 - echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis
44
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053045 - cd ~/frappe-bench
46 - bench get-app erpnext $TRAVIS_BUILD_DIR
Pratik Vyas52d36972015-03-31 13:11:32 +053047 - bench use test_site
Rushabh Mehtacc887902016-07-24 22:45:09 +053048 - bench reinstall --yes
Anand Doshid726ce52015-08-17 15:13:58 +053049 - bench build
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053050 - bench scheduler disable
Anand Doshid726ce52015-08-17 15:13:58 +053051 - bench start &
Anand Doshi1b6c3f12015-05-28 21:46:40 -040052 - sleep 10
Pratik Vyasf437e862013-12-24 12:17:59 +053053
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053054script:
55 - set -e
Rushabh Mehta17e5f412017-08-10 11:03:26 +053056 - bench run-tests
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053057 - sleep 5
Vishal Dhayagude8fd5b322017-08-20 10:59:48 +053058 - bench reinstall --yes
59 - bench execute erpnext.setup.setup_wizard.utils.complete
60 - bench execute erpnext.setup.utils.enable_all_roles_and_domains
Rushabh Mehta17e5f412017-08-10 11:03:26 +053061 - bench run-ui-tests --app erpnext