Pratik Vyas | cc9bc95 | 2014-02-06 14:59:05 +0530 | [diff] [blame] | 1 | language: python |
shreyas | 60e9f84 | 2016-07-29 19:39:49 +0530 | [diff] [blame] | 2 | dist: trusty |
Rushabh Mehta | 4a7b4ef | 2017-07-10 23:00:01 +0530 | [diff] [blame] | 3 | |
Pratik Vyas | f437e86 | 2013-12-24 12:17:59 +0530 | [diff] [blame] | 4 | python: |
| 5 | - "2.7" |
Aditya Hase | 3fa112d | 2019-05-01 11:16:25 +0530 | [diff] [blame] | 6 | - "3.6" |
Pratik Vyas | f437e86 | 2013-12-24 12:17:59 +0530 | [diff] [blame] | 7 | |
Aditya Hase | f397acc | 2019-05-01 11:31:08 +0530 | [diff] [blame] | 8 | env: |
Aditya Hase | 44da737 | 2019-05-01 18:08:44 +0530 | [diff] [blame] | 9 | - TEST_TYPE="Server Side Test" |
| 10 | - TEST_TYPE="Patch Test" |
Aditya Hase | f397acc | 2019-05-01 11:31:08 +0530 | [diff] [blame] | 11 | |
Pratik Vyas | f437e86 | 2013-12-24 12:17:59 +0530 | [diff] [blame] | 12 | services: |
| 13 | - mysql |
| 14 | |
| 15 | install: |
Ameya Shenoy | 4674b17 | 2018-01-11 15:12:29 +0530 | [diff] [blame] | 16 | # fix mongodb travis error |
| 17 | - sudo rm /etc/apt/sources.list.d/mongodb*.list |
Rushabh Mehta | 2653825 | 2017-07-28 11:37:45 +0530 | [diff] [blame] | 18 | - pip install flake8==3.3.0 |
Aditya Hase | 51eecd0 | 2019-06-20 14:07:32 +0530 | [diff] [blame] | 19 | - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics |
Rushabh Mehta | 4a7b4ef | 2017-07-10 23:00:01 +0530 | [diff] [blame] | 20 | - sudo rm /etc/apt/sources.list.d/docker.list |
Ameya Shenoy | f5f8a1f | 2018-04-30 11:10:39 +0530 | [diff] [blame] | 21 | - sudo apt-get install hhvm && rm -rf /home/travis/.kiex/ |
shreyas | 60e9f84 | 2016-07-29 19:39:49 +0530 | [diff] [blame] | 22 | - sudo apt-get purge -y mysql-common mysql-server mysql-client |
Rushabh Mehta | a77a8a4 | 2019-02-26 14:30:00 +0530 | [diff] [blame] | 23 | - nvm install 10 |
Aditya Hase | c7c87a9 | 2018-09-07 19:01:17 +0530 | [diff] [blame] | 24 | - pip install python-coveralls |
shreyas | 60e9f84 | 2016-07-29 19:39:49 +0530 | [diff] [blame] | 25 | - wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py |
| 26 | - sudo python install.py --develop --user travis --without-bench-setup |
| 27 | - sudo pip install -e ~/bench |
| 28 | |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 29 | - rm $TRAVIS_BUILD_DIR/.git/shallow |
Anand Doshi | 6677fd5 | 2016-04-07 18:19:56 +0530 | [diff] [blame] | 30 | - bash $TRAVIS_BUILD_DIR/travis/bench_init.sh |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 31 | - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/ |
Pratik Vyas | 8668081 | 2014-10-12 19:35:46 +0530 | [diff] [blame] | 32 | |
Rushabh Mehta | 4a7b4ef | 2017-07-10 23:00:01 +0530 | [diff] [blame] | 33 | before_script: |
Rushabh Mehta | 4a7b4ef | 2017-07-10 23:00:01 +0530 | [diff] [blame] | 34 | - mysql -u root -ptravis -e 'create database test_frappe' |
| 35 | - echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis |
| 36 | - echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis |
| 37 | |
Pratik Vyas | 2a47eeb | 2015-01-01 15:48:04 +0530 | [diff] [blame] | 38 | - cd ~/frappe-bench |
| 39 | - bench get-app erpnext $TRAVIS_BUILD_DIR |
Pratik Vyas | 52d3697 | 2015-03-31 13:11:32 +0530 | [diff] [blame] | 40 | - bench use test_site |
Sagar Vora | c84e3fe | 2019-01-22 18:16:13 +0530 | [diff] [blame] | 41 | - bench reinstall --mariadb-root-username root --mariadb-root-password travis --yes |
Sagar Vora | ecf6467 | 2019-01-22 17:41:56 +0530 | [diff] [blame] | 42 | - bench scheduler disable |
| 43 | - sed -i 's/9000/9001/g' sites/common_site_config.json |
| 44 | - bench start & |
| 45 | - sleep 10 |
Pratik Vyas | f437e86 | 2013-12-24 12:17:59 +0530 | [diff] [blame] | 46 | |
Aditya Hase | f397acc | 2019-05-01 11:31:08 +0530 | [diff] [blame] | 47 | script: |
Aditya Hase | 700711c | 2019-05-01 18:25:53 +0530 | [diff] [blame] | 48 | - bash $TRAVIS_BUILD_DIR/travis/run-tests.sh |
Aditya Hase | f397acc | 2019-05-01 11:31:08 +0530 | [diff] [blame] | 49 | |
| 50 | after_script: |
| 51 | - coveralls -b apps/erpnext -d ../../sites/.coverage |