brotherton-erpnext/.travis.yml

70 lines
2.2 KiB
YAML
Raw Normal View History

2019-07-25 08:12:43 +00:00
language: python
dist: trusty
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 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 3.6 Patch Test"
python: 3.6
before_script:
- wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
- 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
- pip install frappe-bench
- 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: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"
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
- 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
- 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
- bench get-app erpnext $TRAVIS_BUILD_DIR
- bench start &
- bench --site test_site reinstall --yes
2013-12-24 06:47:59 +00:00
2019-05-01 06:01:08 +00:00
after_script:
- pip install coverage==4.5.4
- pip install python-coveralls
2019-05-01 06:01:08 +00:00
- coveralls -b apps/erpnext -d ../../sites/.coverage