blob: 1561d6ca0fa253c82081a176539616a670a69807 [file] [log] [blame]
shreyas60e9f842016-07-29 19:39:49 +05301dist: trusty
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +05302
Aditya Hase7204bcb2019-07-25 13:42:43 +05303language: python
Aditya Hasef397acc2019-05-01 11:31:08 +05304
Aditya Hase828699f2019-07-25 21:09:34 +05305addons:
6 mariadb: 10.3
Pratik Vyasf437e862013-12-24 12:17:59 +05307
Aditya Hase7204bcb2019-07-25 13:42:43 +05308jobs:
9 include:
10 - name: "Python 2.7 Server Side Test"
11 python: 2.7
12 script: bench run-tests --app erpnext --coverage
13
14 - name: "Python 3.6 Server Side Test"
15 python: 3.6
16 script: bench run-tests --app erpnext --coverage
17
18 - name: "Python 2.7 Patch Test"
19 python: 2.7
20 before_script:
21 - wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
22 - bench --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz --mariadb-root-password travis
23 script: bench migrate
24
25 - name: "Python 3.6 Patch Test"
26 python: 3.6
27 before_script:
28 - wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
29 - bench --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz --mariadb-root-password travis
30 script: bench migrate
31
Pratik Vyasf437e862013-12-24 12:17:59 +053032install:
Ameya Shenoy4674b172018-01-11 15:12:29 +053033 # fix mongodb travis error
Rushabh Mehtaa77a8a42019-02-26 14:30:00 +053034 - nvm install 10
Aditya Hasec7c87a92018-09-07 19:01:17 +053035 - pip install python-coveralls
shreyas60e9f842016-07-29 19:39:49 +053036 - wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
Aditya Hasee5dc8342019-07-04 16:52:01 +053037 - sudo python install.py --develop --user travis --without-bench-setup
shreyas60e9f842016-07-29 19:39:49 +053038 - sudo pip install -e ~/bench
39
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053040 - rm $TRAVIS_BUILD_DIR/.git/shallow
Anand Doshi6677fd52016-04-07 18:19:56 +053041 - bash $TRAVIS_BUILD_DIR/travis/bench_init.sh
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053042 - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
Pratik Vyas86680812014-10-12 19:35:46 +053043
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053044before_script:
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053045 - mysql -u root -ptravis -e 'create database test_frappe'
46 - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis
47 - echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis
48
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053049 - cd ~/frappe-bench
50 - bench get-app erpnext $TRAVIS_BUILD_DIR
Pratik Vyas52d36972015-03-31 13:11:32 +053051 - bench use test_site
Sagar Vorac84e3fe2019-01-22 18:16:13 +053052 - bench reinstall --mariadb-root-username root --mariadb-root-password travis --yes
Sagar Voraecf64672019-01-22 17:41:56 +053053 - bench scheduler disable
54 - sed -i 's/9000/9001/g' sites/common_site_config.json
55 - bench start &
56 - sleep 10
Pratik Vyasf437e862013-12-24 12:17:59 +053057
Aditya Hasef397acc2019-05-01 11:31:08 +053058after_script:
59 - coveralls -b apps/erpnext -d ../../sites/.coverage