e2e.yml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one or more
  3. # contributor license agreements. See the NOTICE file distributed with
  4. # this work for additional information regarding copyright ownership.
  5. # The ASF licenses this file to You under the Apache License, Version 2.0
  6. # (the "License"); you may not use this file except in compliance with
  7. # the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. on:
  18. pull_request:
  19. push:
  20. branches:
  21. - dev
  22. name: E2E
  23. concurrency:
  24. group: e2e-${{ github.event.pull_request.number || github.ref }}
  25. cancel-in-progress: true
  26. jobs:
  27. paths-filter:
  28. name: E2E-Path-Filter
  29. runs-on: ubuntu-latest
  30. outputs:
  31. not-ignore: ${{ steps.filter.outputs.not-ignore }}
  32. steps:
  33. - uses: actions/checkout@v2
  34. - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
  35. id: filter
  36. with:
  37. filters: |
  38. not-ignore:
  39. - '!(docs/**)'
  40. build:
  41. name: E2E-Build
  42. needs: paths-filter
  43. if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }}
  44. runs-on: ubuntu-latest
  45. timeout-minutes: 20
  46. steps:
  47. - uses: actions/checkout@v2
  48. with:
  49. submodules: true
  50. - name: Sanity Check
  51. uses: ./.github/actions/sanity-check
  52. with:
  53. token: ${{ secrets.GITHUB_TOKEN }}
  54. - name: Cache local Maven repository
  55. uses: actions/cache@v3
  56. with:
  57. path: ~/.m2/repository
  58. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-e2e
  59. restore-keys: ${{ runner.os }}-maven-
  60. - name: Build Image
  61. run: |
  62. ./mvnw -B clean install \
  63. -Dmaven.test.skip \
  64. -Dmaven.javadoc.skip \
  65. -Dspotless.skip=true \
  66. -Pdocker,release -Ddocker.tag=ci \
  67. -pl dolphinscheduler-standalone-server -am
  68. - name: Export Docker Images
  69. run: |
  70. docker save apache/dolphinscheduler-standalone-server:ci -o /tmp/standalone-image.tar \
  71. && du -sh /tmp/standalone-image.tar
  72. - uses: actions/upload-artifact@v2
  73. name: Upload Docker Images
  74. with:
  75. name: standalone-image
  76. path: /tmp/standalone-image.tar
  77. retention-days: 1
  78. e2e:
  79. name: ${{ matrix.case.name }}
  80. needs: build
  81. runs-on: ubuntu-latest
  82. timeout-minutes: 30
  83. strategy:
  84. matrix:
  85. case:
  86. - name: Tenant
  87. class: org.apache.dolphinscheduler.e2e.cases.TenantE2ETest
  88. - name: User
  89. class: org.apache.dolphinscheduler.e2e.cases.UserE2ETest
  90. - name: WorkerGroup
  91. class: org.apache.dolphinscheduler.e2e.cases.WorkerGroupE2ETest
  92. - name: Project
  93. class: org.apache.dolphinscheduler.e2e.cases.ProjectE2ETest
  94. - name: Queue
  95. class: org.apache.dolphinscheduler.e2e.cases.QueueE2ETest
  96. - name: Environment
  97. class: org.apache.dolphinscheduler.e2e.cases.EnvironmentE2ETest
  98. - name: Cluster
  99. class: org.apache.dolphinscheduler.e2e.cases.ClusterE2ETest
  100. - name: Token
  101. class: org.apache.dolphinscheduler.e2e.cases.TokenE2ETest
  102. - name: Workflow
  103. class: org.apache.dolphinscheduler.e2e.cases.WorkflowE2ETest
  104. - name: WorkflowHttp
  105. class: org.apache.dolphinscheduler.e2e.cases.WorkflowHttpTaskE2ETest
  106. # - name: WorkflowForSwitch
  107. # class: org.apache.dolphinscheduler.e2e.cases.WorkflowSwitchE2ETest
  108. - name: FileManage
  109. class: org.apache.dolphinscheduler.e2e.cases.FileManageE2ETest
  110. - name: UdfManage
  111. class: org.apache.dolphinscheduler.e2e.cases.UdfManageE2ETest
  112. - name: FunctionManage
  113. class: org.apache.dolphinscheduler.e2e.cases.FunctionManageE2ETest
  114. - name: MysqlDataSource
  115. class: org.apache.dolphinscheduler.e2e.cases.MysqlDataSourceE2ETest
  116. - name: ClickhouseDataSource
  117. class: org.apache.dolphinscheduler.e2e.cases.ClickhouseDataSourceE2ETest
  118. - name: PostgresDataSource
  119. class: org.apache.dolphinscheduler.e2e.cases.PostgresDataSourceE2ETest
  120. env:
  121. RECORDING_PATH: /tmp/recording-${{ matrix.case.name }}
  122. steps:
  123. - uses: actions/checkout@v2
  124. with:
  125. submodules: true
  126. - name: Cache local Maven repository
  127. uses: actions/cache@v3
  128. with:
  129. path: ~/.m2/repository
  130. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-e2e
  131. restore-keys: ${{ runner.os }}-maven-
  132. - uses: actions/download-artifact@v2
  133. name: Download Docker Images
  134. with:
  135. name: standalone-image
  136. path: /tmp
  137. - name: Load Docker Images
  138. run: |
  139. docker load -i /tmp/standalone-image.tar
  140. - name: Run Test
  141. run: |
  142. ./mvnw -B -f dolphinscheduler-e2e/pom.xml -am \
  143. -DfailIfNoTests=false \
  144. -Dtest=${{ matrix.case.class }} test
  145. - uses: actions/upload-artifact@v2
  146. if: always()
  147. name: Upload Recording
  148. with:
  149. name: recording-${{ matrix.case.name }}
  150. path: ${{ env.RECORDING_PATH }}
  151. retention-days: 1
  152. e2e-optional:
  153. name: ${{ matrix.case.name }}
  154. needs: build
  155. runs-on: ubuntu-latest
  156. timeout-minutes: 30
  157. strategy:
  158. matrix:
  159. case:
  160. - name: SqlServerDataSource
  161. class: org.apache.dolphinscheduler.e2e.cases.SqlServerDataSourceE2ETest
  162. - name: HiveDataSource
  163. class: org.apache.dolphinscheduler.e2e.cases.HiveDataSourceE2ETest
  164. env:
  165. RECORDING_PATH: /tmp/recording-${{ matrix.case.name }}
  166. steps:
  167. - uses: actions/checkout@v2
  168. with:
  169. submodules: true
  170. - name: Cache local Maven repository
  171. uses: actions/cache@v3
  172. with:
  173. path: ~/.m2/repository
  174. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-e2e
  175. restore-keys: ${{ runner.os }}-maven-
  176. - uses: actions/download-artifact@v2
  177. name: Download Docker Images
  178. with:
  179. name: standalone-image
  180. path: /tmp
  181. - name: Load Docker Images
  182. run: |
  183. docker load -i /tmp/standalone-image.tar
  184. - name: Run Test
  185. run: |
  186. ./mvnw -B -f dolphinscheduler-e2e/pom.xml -am \
  187. -DfailIfNoTests=false \
  188. -Dtest=${{ matrix.case.class }} test
  189. - uses: actions/upload-artifact@v2
  190. if: always()
  191. name: Upload Recording
  192. with:
  193. name: recording-${{ matrix.case.name }}
  194. path: ${{ env.RECORDING_PATH }}
  195. retention-days: 1
  196. result:
  197. name: E2E
  198. runs-on: ubuntu-latest
  199. timeout-minutes: 30
  200. needs: [ e2e, paths-filter ]
  201. if: always()
  202. steps:
  203. - name: Status
  204. run: |
  205. if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then
  206. echo "Skip E2E!"
  207. exit 0
  208. fi
  209. if [[ ${{ needs.e2e.result }} != 'success' ]]; then
  210. echo "E2E Failed!"
  211. exit -1
  212. fi