blob: e0a2ead3d53b5f30ac2402345e6ee23453e9c43c [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:
Aditya Hase306a4102019-07-25 21:11:18 +053033 - cd ~
Rushabh Mehtaa77a8a42019-02-26 14:30:00 +053034 - nvm install 10
Aditya Hase306a4102019-07-25 21:11:18 +053035
36 - git clone https://github.com/frappe/bench --depth 1
37 - pip install -e ./bench
shreyas60e9f842016-07-29 19:39:49 +053038
Aditya Haseac185982019-07-25 21:15:30 +053039 - git clone https://github.com/frappe/frappe --branch $TRAVIS_BRANCH --depth 1
40 - bench init --frappe-path ~/frappe --python $(which python) frappe-bench
41
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:
Aditya Hasec49d4542019-07-25 21:10:06 +053059 - pip install python-coveralls
Aditya Hasef397acc2019-05-01 11:31:08 +053060 - coveralls -b apps/erpnext -d ../../sites/.coverage