brotherton-erpnext/.travis.yml

71 lines
2.3 KiB
YAML
Raw Normal View History

dist: trusty
2019-07-25 08:12:43 +00:00
language: python
2019-05-01 06:01:08 +00:00
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
- bench --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz --mariadb-root-password travis
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 15:51:19 +00:00
- bench --site test_site --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz --mariadb-root-password travis
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
- git clone https://github.com/frappe/frappe --branch $TRAVIS_BRANCH --depth 1
- bench init --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
before_script:
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"
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 start &
- bench get-app erpnext $TRAVIS_BUILD_DIR
- 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 python-coveralls
2019-05-01 06:01:08 +00:00
- coveralls -b apps/erpnext -d ../../sites/.coverage