shreyas | 60e9f84 | 2016-07-29 19:39:49 +0530 | [diff] [blame] | 1 | dist: trusty |
Rushabh Mehta | 4a7b4ef | 2017-07-10 23:00:01 +0530 | [diff] [blame] | 2 | |
Aditya Hase | 7204bcb | 2019-07-25 13:42:43 +0530 | [diff] [blame] | 3 | language: python |
Aditya Hase | f397acc | 2019-05-01 11:31:08 +0530 | [diff] [blame] | 4 | |
Aditya Hase | 828699f | 2019-07-25 21:09:34 +0530 | [diff] [blame] | 5 | addons: |
| 6 | mariadb: 10.3 |
Pratik Vyas | f437e86 | 2013-12-24 12:17:59 +0530 | [diff] [blame] | 7 | |
Aditya Hase | 7204bcb | 2019-07-25 13:42:43 +0530 | [diff] [blame] | 8 | jobs: |
| 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 Vyas | f437e86 | 2013-12-24 12:17:59 +0530 | [diff] [blame] | 32 | install: |
Aditya Hase | 306a410 | 2019-07-25 21:11:18 +0530 | [diff] [blame^] | 33 | - cd ~ |
Rushabh Mehta | a77a8a4 | 2019-02-26 14:30:00 +0530 | [diff] [blame] | 34 | - nvm install 10 |
Aditya Hase | 306a410 | 2019-07-25 21:11:18 +0530 | [diff] [blame^] | 35 | |
| 36 | - git clone https://github.com/frappe/bench --depth 1 |
| 37 | - pip install -e ./bench |
shreyas | 60e9f84 | 2016-07-29 19:39:49 +0530 | [diff] [blame] | 38 | |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 39 | - rm $TRAVIS_BUILD_DIR/.git/shallow |
Anand Doshi | 6677fd5 | 2016-04-07 18:19:56 +0530 | [diff] [blame] | 40 | - bash $TRAVIS_BUILD_DIR/travis/bench_init.sh |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 41 | - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/ |
Pratik Vyas | 8668081 | 2014-10-12 19:35:46 +0530 | [diff] [blame] | 42 | |
Rushabh Mehta | 4a7b4ef | 2017-07-10 23:00:01 +0530 | [diff] [blame] | 43 | before_script: |
Rushabh Mehta | 4a7b4ef | 2017-07-10 23:00:01 +0530 | [diff] [blame] | 44 | - mysql -u root -ptravis -e 'create database test_frappe' |
| 45 | - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis |
| 46 | - echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis |
| 47 | |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 48 | - cd ~/frappe-bench |
| 49 | - bench get-app erpnext $TRAVIS_BUILD_DIR |
Pratik Vyas | 52d3697 | 2015-03-31 13:11:32 +0530 | [diff] [blame] | 50 | - bench use test_site |
Sagar Vora | c84e3fe | 2019-01-22 18:16:13 +0530 | [diff] [blame] | 51 | - bench reinstall --mariadb-root-username root --mariadb-root-password travis --yes |
Sagar Vora | ecf6467 | 2019-01-22 17:41:56 +0530 | [diff] [blame] | 52 | - bench scheduler disable |
| 53 | - sed -i 's/9000/9001/g' sites/common_site_config.json |
| 54 | - bench start & |
| 55 | - sleep 10 |
Pratik Vyas | f437e86 | 2013-12-24 12:17:59 +0530 | [diff] [blame] | 56 | |
Aditya Hase | f397acc | 2019-05-01 11:31:08 +0530 | [diff] [blame] | 57 | after_script: |
Aditya Hase | c49d454 | 2019-07-25 21:10:06 +0530 | [diff] [blame] | 58 | - pip install python-coveralls |
Aditya Hase | f397acc | 2019-05-01 11:31:08 +0530 | [diff] [blame] | 59 | - coveralls -b apps/erpnext -d ../../sites/.coverage |