blob: 54d77db7c694e22a53f16cbc3df67f1609aa6c61 [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:
Aditya Hasefb2ec712019-07-25 21:21:19 +05306 hosts: test_site
Aditya Hase9b24a422019-07-25 21:09:34 +05307 mariadb: 10.3
Pratik Vyasf437e862013-12-24 12:17:59 +05308
Aditya Hasee0e78fb2019-07-25 13:42:43 +05309jobs:
10 include:
11 - name: "Python 2.7 Server Side Test"
12 python: 2.7
Aditya Hasefb2ec712019-07-25 21:21:19 +053013 script: bench --site test_site run-tests --app erpnext --coverage
Aditya Hasee0e78fb2019-07-25 13:42:43 +053014
15 - name: "Python 3.6 Server Side Test"
16 python: 3.6
Aditya Hasefb2ec712019-07-25 21:21:19 +053017 script: bench --site test_site run-tests --app erpnext --coverage
Aditya Hasee0e78fb2019-07-25 13:42:43 +053018
19 - name: "Python 2.7 Patch Test"
20 python: 2.7
21 before_script:
22 - wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
23 - bench --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz --mariadb-root-password travis
Aditya Hasefb2ec712019-07-25 21:21:19 +053024 script: bench --site test_site migrate
Aditya Hasee0e78fb2019-07-25 13:42:43 +053025
26 - name: "Python 3.6 Patch Test"
27 python: 3.6
28 before_script:
29 - wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
Aditya Hasefb2ec712019-07-25 21:21:19 +053030 - bench --site test_site --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz --mariadb-root-password travis
31 script: bench --site test_site migrate
Aditya Hasee0e78fb2019-07-25 13:42:43 +053032
Pratik Vyasf437e862013-12-24 12:17:59 +053033install:
Aditya Hase3f6ac2d2019-07-25 21:11:18 +053034 - cd ~
Rushabh Mehtaa77a8a42019-02-26 14:30:00 +053035 - nvm install 10
Aditya Hase3f6ac2d2019-07-25 21:11:18 +053036
37 - git clone https://github.com/frappe/bench --depth 1
38 - pip install -e ./bench
shreyas60e9f842016-07-29 19:39:49 +053039
Aditya Hase23f24d12019-07-25 21:15:30 +053040 - git clone https://github.com/frappe/frappe --branch $TRAVIS_BRANCH --depth 1
41 - bench init --frappe-path ~/frappe --python $(which python) frappe-bench
42
Aditya Hasee2b16e32019-07-25 21:18:05 +053043 - mkdir ~/frappe-bench/sites/test_site
44 - cp -r $TRAVIS_BUILD_DIR/.travis/site_config.json ~/frappe-bench/sites/test_site/
Pratik Vyas86680812014-10-12 19:35:46 +053045
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053046before_script:
Aditya Hase185e2a22019-07-25 21:19:30 +053047 - mysql -u root -e "SET GLOBAL character_set_server = 'utf8mb4'"
48 - mysql -u root -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"
49
50 - mysql -u root -e "CREATE DATABASE test_frappe"
51 - mysql -u root -e "CREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe'"
52 - mysql -u root -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost'"
53
54 - mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('travis') WHERE User='root'"
55 - mysql -u root -e "FLUSH PRIVILEGES"
Rushabh Mehta4a7b4ef2017-07-10 23:00:01 +053056
Pratik Vyas2a47eeb2015-01-01 15:48:04 +053057 - cd ~/frappe-bench
Sagar Voraecf64672019-01-22 17:41:56 +053058 - sed -i 's/9000/9001/g' sites/common_site_config.json
59 - bench start &
Aditya Hase903e8782019-07-25 21:23:24 +053060 - bench get-app erpnext $TRAVIS_BUILD_DIR
Aditya Hase7c44ada2019-07-25 21:25:53 +053061 - bench --site test_site reinstall --yes
Pratik Vyasf437e862013-12-24 12:17:59 +053062
Aditya Hasef397acc2019-05-01 11:31:08 +053063after_script:
Aditya Hase2fb9e8a2019-07-25 21:10:06 +053064 - pip install python-coveralls
Aditya Hasef397acc2019-05-01 11:31:08 +053065 - coveralls -b apps/erpnext -d ../../sites/.coverage