2016-07-29 14:09:49 +00:00
|
|
|
dist: trusty
|
2017-07-10 17:30:01 +00:00
|
|
|
|
2019-07-25 08:12:43 +00:00
|
|
|
language: python
|
2019-05-01 06:01:08 +00:00
|
|
|
|
2019-07-25 16:06:22 +00:00
|
|
|
git:
|
|
|
|
depth: 1
|
|
|
|
|
|
|
|
cache:
|
|
|
|
- pip
|
|
|
|
|
2019-07-25 15:39:34 +00:00
|
|
|
addons:
|
2019-07-25 15:51:19 +00:00
|
|
|
hosts: test_site
|
2019-07-25 15:39:34 +00:00
|
|
|
mariadb: 10.3
|
2013-12-24 06:47:59 +00:00
|
|
|
|
2019-07-25 08:12:43 +00:00
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- name: "Python 2.7 Server Side Test"
|
|
|
|
python: 2.7
|
2019-07-25 15:51:19 +00:00
|
|
|
script: bench --site test_site run-tests --app erpnext --coverage
|
2019-07-25 08:12:43 +00:00
|
|
|
|
|
|
|
- name: "Python 3.6 Server Side Test"
|
|
|
|
python: 3.6
|
2019-07-25 15:51:19 +00:00
|
|
|
script: bench --site test_site run-tests --app erpnext --coverage
|
2019-07-25 08:12:43 +00:00
|
|
|
|
|
|
|
- name: "Python 2.7 Patch Test"
|
|
|
|
python: 2.7
|
|
|
|
before_script:
|
|
|
|
- wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
|
2019-07-25 16:21:12 +00:00
|
|
|
- bench --site test_site --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz
|
2019-07-25 15:51:19 +00:00
|
|
|
script: bench --site test_site migrate
|
2019-07-25 08:12:43 +00:00
|
|
|
|
|
|
|
- name: "Python 3.6 Patch Test"
|
|
|
|
python: 3.6
|
|
|
|
before_script:
|
|
|
|
- wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
|
2019-07-25 16:21:12 +00:00
|
|
|
- bench --site test_site --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz
|
2019-07-25 15:51:19 +00:00
|
|
|
script: bench --site test_site migrate
|
2019-07-25 08:12:43 +00:00
|
|
|
|
2013-12-24 06:47:59 +00:00
|
|
|
install:
|
2019-07-25 15:41:18 +00:00
|
|
|
- cd ~
|
2019-02-26 09:00:00 +00:00
|
|
|
- nvm install 10
|
2019-07-25 15:41:18 +00:00
|
|
|
|
|
|
|
- git clone https://github.com/frappe/bench --depth 1
|
|
|
|
- pip install -e ./bench
|
2016-07-29 14:09:49 +00:00
|
|
|
|
2019-07-25 15:45:30 +00:00
|
|
|
- git clone https://github.com/frappe/frappe --branch $TRAVIS_BRANCH --depth 1
|
2019-07-25 15:58:15 +00:00
|
|
|
- bench init --skip-assets --frappe-path ~/frappe --python $(which python) frappe-bench
|
2019-07-25 15:45:30 +00:00
|
|
|
|
2019-07-25 15:48:05 +00:00
|
|
|
- mkdir ~/frappe-bench/sites/test_site
|
|
|
|
- cp -r $TRAVIS_BUILD_DIR/.travis/site_config.json ~/frappe-bench/sites/test_site/
|
2014-10-12 14:05:46 +00:00
|
|
|
|
2019-07-25 15:49:30 +00:00
|
|
|
- mysql -u root -e "SET GLOBAL character_set_server = 'utf8mb4'"
|
|
|
|
- mysql -u root -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"
|
|
|
|
|
|
|
|
- mysql -u root -e "CREATE DATABASE test_frappe"
|
|
|
|
- mysql -u root -e "CREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe'"
|
|
|
|
- mysql -u root -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost'"
|
|
|
|
|
|
|
|
- mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('travis') WHERE User='root'"
|
|
|
|
- mysql -u root -e "FLUSH PRIVILEGES"
|
2017-07-10 17:30:01 +00:00
|
|
|
|
2019-07-25 17:10:26 +00:00
|
|
|
- wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
|
|
|
|
- tar -xf /tmp/wkhtmltox.tar.xz -C /tmp
|
|
|
|
- sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
|
|
|
|
- sudo chmod o+x /usr/local/bin/wkhtmltopdf
|
2019-11-27 09:23:58 +00:00
|
|
|
- sudo apt-get install libcups2-dev
|
2019-07-25 17:10:26 +00:00
|
|
|
|
2015-01-01 10:18:04 +00:00
|
|
|
- cd ~/frappe-bench
|
2019-07-25 15:57:20 +00:00
|
|
|
|
|
|
|
- sed -i 's/watch:/# watch:/g' Procfile
|
|
|
|
- sed -i 's/schedule:/# schedule:/g' Procfile
|
|
|
|
- sed -i 's/socketio:/# socketio:/g' Procfile
|
|
|
|
- sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile
|
|
|
|
|
2019-07-25 15:53:24 +00:00
|
|
|
- bench get-app erpnext $TRAVIS_BUILD_DIR
|
2019-07-25 16:08:07 +00:00
|
|
|
- bench start &
|
2019-07-25 15:55:53 +00:00
|
|
|
- bench --site test_site reinstall --yes
|
2013-12-24 06:47:59 +00:00
|
|
|
|
2019-05-01 06:01:08 +00:00
|
|
|
after_script:
|
2019-07-25 15:40:06 +00:00
|
|
|
- pip install python-coveralls
|
2019-05-01 06:01:08 +00:00
|
|
|
- coveralls -b apps/erpnext -d ../../sites/.coverage
|