blob: ace0bfb2434bb109eb472b0e1d819d281ddabe2a [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
Pratik Vyasf437e862013-12-24 12:17:59 +05304python:
5 - "2.7"
Aditya Hase3fa112d2019-05-01 11:16:25 +05306 - "3.6"
Pratik Vyasf437e862013-12-24 12:17:59 +05307
Aditya Hasef397acc2019-05-01 11:31:08 +05308env:
Aditya Hase44da7372019-05-01 18:08:44 +05309 - TEST_TYPE="Server Side Test"
10 - TEST_TYPE="Patch Test"
Aditya Hasef397acc2019-05-01 11:31:08 +053011
Pratik Vyasf437e862013-12-24 12:17:59 +053012services:
13 - mysql
14
15install:
Ameya Shenoy4674b172018-01-11 15:12:29 +053016 # fix mongodb travis error
Rushabh Mehtaa77a8a42019-02-26 14:30:00 +053017 - nvm install 10
Aditya Hasec7c87a92018-09-07 19:01:17 +053018 - pip install python-coveralls
shreyas60e9f842016-07-29 19:39:49 +053019 - wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
Aditya Hasee5dc8342019-07-04 16:52:01 +053020 - sudo python install.py --develop --user travis --without-bench-setup
shreyas60e9f842016-07-29 19:39:49 +053021 - sudo pip install -e ~/bench
22
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
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053027before_script:
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053028 - mysql -u root -ptravis -e 'create database test_frappe'
29 - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis
30 - echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis
31
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053032 - cd ~/frappe-bench
33 - bench get-app erpnext $TRAVIS_BUILD_DIR
Pratik Vyas52d36972015-03-31 13:11:32 +053034 - bench use test_site
Sagar Vorac84e3fe2019-01-22 18:16:13 +053035 - bench reinstall --mariadb-root-username root --mariadb-root-password travis --yes
Sagar Voraecf64672019-01-22 17:41:56 +053036 - bench scheduler disable
37 - sed -i 's/9000/9001/g' sites/common_site_config.json
38 - bench start &
39 - sleep 10
Pratik Vyasf437e862013-12-24 12:17:59 +053040
Aditya Hasef397acc2019-05-01 11:31:08 +053041script:
Aditya Hase700711c2019-05-01 18:25:53 +053042 - bash $TRAVIS_BUILD_DIR/travis/run-tests.sh
Aditya Hasef397acc2019-05-01 11:31:08 +053043
44after_script:
45 - coveralls -b apps/erpnext -d ../../sites/.coverage