forked from frappe/erpnext
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'version-12-hotfix' into version-12
- Loading branch information
Showing
22 changed files
with
455 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,80 @@ | ||
language: python | ||
dist: trusty | ||
|
||
python: | ||
- "2.7" | ||
- "3.6" | ||
language: python | ||
|
||
git: | ||
depth: 1 | ||
|
||
cache: | ||
- pip | ||
|
||
addons: | ||
hosts: test_site | ||
mariadb: 10.3 | ||
|
||
env: | ||
- TEST_TYPE="Server Side Test" | ||
- TEST_TYPE="Patch Test" | ||
jobs: | ||
include: | ||
- name: "Python 2.7 Server Side Test" | ||
python: 2.7 | ||
script: bench --site test_site run-tests --app erpnext --coverage | ||
|
||
services: | ||
- mysql | ||
- name: "Python 3.6 Server Side Test" | ||
python: 3.6 | ||
script: bench --site test_site run-tests --app erpnext --coverage | ||
|
||
- name: "Python 2.7 Patch Test" | ||
python: 2.7 | ||
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 | ||
script: bench --site test_site migrate | ||
|
||
- 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 | ||
script: bench --site test_site migrate | ||
|
||
install: | ||
# fix mongodb travis error | ||
- sudo rm /etc/apt/sources.list.d/mongodb*.list | ||
- pip install flake8==3.3.0 | ||
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics | ||
- sudo rm /etc/apt/sources.list.d/docker.list | ||
- sudo apt-get install hhvm && rm -rf /home/travis/.kiex/ | ||
- sudo apt-get purge -y mysql-common mysql-server mysql-client | ||
- cd ~ | ||
- nvm install 10 | ||
- pip install python-coveralls | ||
- wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py | ||
- sudo python install.py --develop --user travis --without-bench-setup | ||
- sudo pip install -e ~/bench | ||
|
||
- rm $TRAVIS_BUILD_DIR/.git/shallow | ||
- bash $TRAVIS_BUILD_DIR/travis/bench_init.sh | ||
- cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/ | ||
- 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 --skip-assets --frappe-path ~/frappe --python $(which python) frappe-bench | ||
|
||
before_script: | ||
- mysql -u root -ptravis -e 'create database test_frappe' | ||
- echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis | ||
- echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis | ||
- mkdir ~/frappe-bench/sites/test_site | ||
- cp -r $TRAVIS_BUILD_DIR/.travis/site_config.json ~/frappe-bench/sites/test_site/ | ||
|
||
- 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" | ||
|
||
- 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 | ||
|
||
- 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 use test_site | ||
- bench reinstall --mariadb-root-username root --mariadb-root-password travis --yes | ||
- bench scheduler disable | ||
- sed -i 's/9000/9001/g' sites/common_site_config.json | ||
- bench start & | ||
- sleep 10 | ||
|
||
script: | ||
- bash $TRAVIS_BUILD_DIR/travis/run-tests.sh | ||
- bench --site test_site reinstall --yes | ||
|
||
after_script: | ||
- pip install python-coveralls | ||
- coveralls -b apps/erpnext -d ../../sites/.coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ | |
"mail_login": "[email protected]", | ||
"mail_password": "test", | ||
"admin_password": "admin", | ||
"run_selenium_tests": 1, | ||
"root_login": "root", | ||
"root_password": "travis", | ||
"host_name": "http://localhost:8000", | ||
"host_name": "http://test_site:8000", | ||
"install_apps": ["erpnext"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.