25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

84 lines
2.3 KiB

  1. name: Patch
  2. on: [pull_request, workflow_dispatch]
  3. jobs:
  4. test:
  5. runs-on: ubuntu-18.04
  6. name: Patch Test
  7. services:
  8. mysql:
  9. image: mariadb:10.3
  10. env:
  11. MYSQL_ALLOW_EMPTY_PASSWORD: YES
  12. ports:
  13. - 3306:3306
  14. options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
  15. steps:
  16. - name: Clone
  17. uses: actions/checkout@v2
  18. - name: Setup Python
  19. uses: actions/setup-python@v2
  20. with:
  21. python-version: 3.7
  22. - name: Add to Hosts
  23. run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
  24. - name: Cache pip
  25. uses: actions/cache@v2
  26. with:
  27. path: ~/.cache/pip
  28. key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
  29. restore-keys: |
  30. ${{ runner.os }}-pip-
  31. ${{ runner.os }}-
  32. - name: Cache node modules
  33. uses: actions/cache@v2
  34. env:
  35. cache-name: cache-node-modules
  36. with:
  37. path: ~/.npm
  38. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
  39. restore-keys: |
  40. ${{ runner.os }}-build-${{ env.cache-name }}-
  41. ${{ runner.os }}-build-
  42. ${{ runner.os }}-
  43. - name: Get yarn cache directory path
  44. id: yarn-cache-dir-path
  45. run: echo "::set-output name=dir::$(yarn cache dir)"
  46. - uses: actions/cache@v2
  47. id: yarn-cache
  48. with:
  49. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  50. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  51. restore-keys: |
  52. ${{ runner.os }}-yarn-
  53. - name: Install Dependencies
  54. run: bash ${GITHUB_WORKSPACE}/.github/helper/install_dependencies.sh
  55. env:
  56. BEFORE: ${{ env.GITHUB_EVENT_PATH.before }}
  57. AFTER: ${{ env.GITHUB_EVENT_PATH.after }}
  58. TYPE: server
  59. - name: Install
  60. run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
  61. env:
  62. DB: mariadb
  63. TYPE: server
  64. - name: Run Patch Tests
  65. run: |
  66. cd ~/frappe-bench/
  67. wget https://frappeframework.com/files/v10-frappe.sql.gz
  68. bench --site test_site --force restore ~/frappe-bench/v10-frappe.sql.gz
  69. bench --site test_site migrate