blob: 108df91e401c50e6d1c698ca2f61b22bb3e6b151 [file] [log] [blame]
shreyas60e9f842016-07-29 19:39:49 +05301dist: trusty
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +05302
Aditya Hasee0e78fb2019-07-25 13:42:43 +05303language: python
Aditya Hasef397acc2019-05-01 11:31:08 +05304
Aditya Hase9b24a422019-07-25 21:09:34 +05305addons:
6 mariadb: 10.3
Pratik Vyasf437e862013-12-24 12:17:59 +05307
Aditya Hasee0e78fb2019-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 Hase3f6ac2d2019-07-25 21:11:18 +053033 - cd ~
Rushabh Mehtaa77a8a42019-02-26 14:30:00 +053034 - nvm install 10
Aditya Hase3f6ac2d2019-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 Hase23f24d12019-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
Aditya Hasee2b16e32019-07-25 21:18:05 +053042 - mkdir ~/frappe-bench/sites/test_site
43 - cp -r $TRAVIS_BUILD_DIR/.travis/site_config.json ~/frappe-bench/sites/test_site/
Pratik Vyas86680812014-10-12 19:35:46 +053044
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053045before_script:
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053046 - mysql -u root -ptravis -e 'create database test_frappe'
47 - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis
48 - echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis
49
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053050 - cd ~/frappe-bench
51 - bench get-app erpnext $TRAVIS_BUILD_DIR
Pratik Vyas52d36972015-03-31 13:11:32 +053052 - bench use test_site
Sagar Vorac84e3fe2019-01-22 18:16:13 +053053 - bench reinstall --mariadb-root-username root --mariadb-root-password travis --yes
Sagar Voraecf64672019-01-22 17:41:56 +053054 - bench scheduler disable
55 - sed -i 's/9000/9001/g' sites/common_site_config.json
56 - bench start &
57 - sleep 10
Pratik Vyasf437e862013-12-24 12:17:59 +053058
Aditya Hasef397acc2019-05-01 11:31:08 +053059after_script:
Aditya Hase2fb9e8a2019-07-25 21:10:06 +053060 - pip install python-coveralls
Aditya Hasef397acc2019-05-01 11:31:08 +053061 - coveralls -b apps/erpnext -d ../../sites/.coverage