You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1.8 KiB

  1. #!/bin/bash
  2. set -ex
  3. cd ~ || exit
  4. sudo apt-get install redis-server libcups2-dev -qq
  5. pip install frappe-bench
  6. git clone https://github.com/frappe/frappe --branch version-14-beta --depth 1
  7. bench init --skip-assets --frappe-path ~/frappe --python "$(which python)" frappe-bench
  8. mkdir ~/frappe-bench/sites/test_site
  9. cp -r "${GITHUB_WORKSPACE}/.github/helper/site_config.json" ~/frappe-bench/sites/test_site/
  10. mysql --host 127.0.0.1 --port 3306 -u root -e "SET GLOBAL character_set_server = 'utf8mb4'"
  11. mysql --host 127.0.0.1 --port 3306 -u root -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"
  12. mysql --host 127.0.0.1 --port 3306 -u root -e "CREATE DATABASE test_frappe"
  13. mysql --host 127.0.0.1 --port 3306 -u root -e "CREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe'"
  14. mysql --host 127.0.0.1 --port 3306 -u root -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost'"
  15. mysql --host 127.0.0.1 --port 3306 -u root -e "CREATE USER 'test_frappe'@'172.18.0.1' IDENTIFIED BY 'test_frappe'"
  16. mysql --host 127.0.0.1 --port 3306 -u root -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'172.18.0.1'"
  17. mysql --host 127.0.0.1 --port 3306 -u root -e "UPDATE mysql.user SET Password=PASSWORD('travis') WHERE User='root'"
  18. mysql --host 127.0.0.1 --port 3306 -u root -e "FLUSH PRIVILEGES"
  19. cd ~/frappe-bench || exit
  20. sed -i 's/watch:/# watch:/g' Procfile
  21. sed -i 's/schedule:/# schedule:/g' Procfile
  22. sed -i 's/socketio:/# socketio:/g' Procfile
  23. sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile
  24. bench get-app erpnext --branch version-14-beta
  25. bench get-app payments
  26. bench setup requirements --dev
  27. bench start &
  28. bench --site test_site reinstall --yes
  29. bench get-app healthcare "${GITHUB_WORKSPACE}"
  30. bench --verbose --site test_site install-app healthcare