mirror of
https://github.com/frappe/bench.git
synced 2024-11-14 09:14:04 +00:00
1f5c7ec201
* chore: added deepsource config * chore: updated travis config * chore: updated travis config * chore: updated travis tests for 2.7, 3.6, 3.7, 3.8 * chore: quiet installs and sudo easy install * fix(tests): add mariadb versioning * fix(travis): print compat for pyhton 3 * fix: drop deprecated function usage * chore(tests): update test_init * tests: update branch to use version-12 for testing and use git module * chore: quieten git command outputs on branch switch * fix: execute 'setup production' via cli * style: sort imports * chore: update mariadb variables in .travis.yml * chore: seperate jobs for easy install and production setup * chore: use exec_cmd to log command output * chore: pin tests to ubuntu trusty * chore: use playbooks to install mariadb * chore: mariadb fixes in travis * chore: pin dist to ubuntu 18.04 * chore: setup envs according by type of test * chore: ignore auto backup, procfile, assets build * chore: change app frammeclient to frappe_theme * test: try travis_wait * tests: update and restructure tests * tests: restructure flow of setUp, tearDown * fix: python class inheritence fix * chore: use local frappe repo instead of remote pull * tests: skip assets during get-app * fix(tests): remove reinstalling app after get_app called * fix(tests): updated test_install_app * fix: broken remove_app tests: broken tests * tests: no backup while dropping new_sites * tests: added certain tests and py obj fixes * tests: seperate basic and production setup tests * tests: update travis, remove basic setup * chore: move from function calls to exec_cmd * chore: tests fixes * chore: removed sudo from basic setup runs * chore: use "sudo" for setting up sudoers * fix: allow get_app from local folder * fix: use gitpython to switch branch instead of exec_cmd * chore: use test to check for file existing * chore: restructure bench tests * fix: fetch app repo before checking for version upgrade during switch_branch * fix: gitpython error in usage * fix: boolean return value of file_exists * fix: dont decode file contents * fix: bench names and close open files * chore: update bench config multiple benches * chore: check where production fails * chore: mention python version for init * chore: remove node production test in CI * fix: compatibility and permissions fixes * chore: setup sudoers after prod setup * fix: set remote upstream after local clone * fix: disable production via cli * chore(tests): fix upstream link * chore: split tests and remove unused imports
97 lines
2.7 KiB
YAML
97 lines
2.7 KiB
YAML
language: python
|
|
dist: bionic
|
|
sudo: true
|
|
|
|
git:
|
|
depth: 1
|
|
|
|
cache:
|
|
- pip
|
|
- npm
|
|
- yarn
|
|
|
|
addons:
|
|
mariadb: '10.3'
|
|
|
|
matrix:
|
|
include:
|
|
- name: "Python 2.7 Basic Setup"
|
|
python: 2.7
|
|
env: TEST=bench
|
|
script: python -m unittest -v bench.tests.test_init
|
|
|
|
- name: "Python 3.6 Basic Setup"
|
|
python: 3.6
|
|
env: TEST=bench
|
|
script: python -m unittest -v bench.tests.test_init
|
|
|
|
- name: "Python 3.7 Basic Setup"
|
|
python: 3.7
|
|
env: TEST=bench
|
|
script: python -m unittest -v bench.tests.test_init
|
|
|
|
- name: "Python 3.8 Production Setup"
|
|
python: 3.8
|
|
env: TEST=bench
|
|
script: python -m unittest -v bench.tests.test_setup_production
|
|
|
|
- name: "Python 2.7 Production Setup"
|
|
python: 2.7
|
|
env: TEST=bench
|
|
script: python -m unittest -v bench.tests.test_setup_production
|
|
|
|
- name: "Python 3.6 Production Setup"
|
|
python: 3.6
|
|
env: TEST=bench
|
|
script: python -m unittest -v bench.tests.test_setup_production
|
|
|
|
- name: "Python 3.7 Production Setup"
|
|
python: 3.7
|
|
env: TEST=bench
|
|
script: python -m unittest -v bench.tests.test_setup_production
|
|
|
|
- name: "Python 3.8 Production Setup"
|
|
python: 3.8
|
|
env: TEST=bench
|
|
script: python -m unittest -v bench.tests.test_setup_production
|
|
|
|
- name: "Python 3.6 Easy Install"
|
|
python: 3.6
|
|
env: TEST=easy_install
|
|
script: sudo python $TRAVIS_BUILD_DIR/playbooks/install.py --user travis --run-travis --production --verbose
|
|
|
|
- name: "Python 3.7 Easy Install"
|
|
python: 3.7
|
|
env: TEST=easy_install
|
|
script: sudo python $TRAVIS_BUILD_DIR/playbooks/install.py --user travis --run-travis --production --verbose
|
|
|
|
- name: "Python 3.8 Easy Install"
|
|
python: 3.8
|
|
env: TEST=easy_install
|
|
script: sudo python $TRAVIS_BUILD_DIR/playbooks/install.py --user travis --run-travis --production --verbose
|
|
|
|
install:
|
|
- pip install urllib3 pyOpenSSL ndg-httpsclient pyasn1
|
|
|
|
- if [ $TEST == "bench" ];then
|
|
wget -q -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;
|
|
|
|
mkdir -p ~/.bench;
|
|
cp -r $TRAVIS_BUILD_DIR/* ~/.bench;
|
|
pip install -q -U -e ~/.bench;
|
|
sudo pip install -q -U -e ~/.bench;
|
|
|
|
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 "UPDATE mysql.user SET Password=PASSWORD('travis') WHERE User='root'";
|
|
mysql -u root -e "FLUSH PRIVILEGES";
|
|
fi
|
|
|
|
- if [ $TEST == "easy_install" ];then
|
|
mkdir -p /tmp/.bench;
|
|
cp -r $TRAVIS_BUILD_DIR/* /tmp/.bench;
|
|
fi
|