e2e.yml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. ignore: ${{ steps.filter.outputs.ignore }}
  32. steps:
  33. - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
  34. id: filter
  35. with:
  36. filters: |
  37. ignore:
  38. - '(docs/**)'
  39. build:
  40. name: E2E-Build
  41. needs: paths-filter
  42. if: ${{ needs.paths-filter.outputs.ignore == 'false' }}
  43. runs-on: ubuntu-latest
  44. timeout-minutes: 20
  45. steps:
  46. - uses: actions/checkout@v2
  47. with:
  48. submodules: true
  49. - name: Sanity Check
  50. uses: ./.github/actions/sanity-check
  51. - name: Cache local Maven repository
  52. uses: actions/cache@v2
  53. with:
  54. path: ~/.m2/repository
  55. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
  56. restore-keys: ${{ runner.os }}-maven-
  57. - name: Build Image
  58. run: |
  59. ./mvnw -B clean install \
  60. -Dmaven.test.skip \
  61. -Dmaven.javadoc.skip \
  62. -Dmaven.checkstyle.skip \
  63. -Pdocker,release -Ddocker.tag=ci \
  64. -pl dolphinscheduler-standalone-server -am
  65. - name: Export Docker Images
  66. run: |
  67. docker save apache/dolphinscheduler-standalone-server:ci -o /tmp/standalone-image.tar \
  68. && du -sh /tmp/standalone-image.tar
  69. - uses: actions/upload-artifact@v2
  70. name: Upload Docker Images
  71. with:
  72. name: standalone-image
  73. path: /tmp/standalone-image.tar
  74. retention-days: 1
  75. e2e:
  76. name: ${{ matrix.case.name }}
  77. needs: build
  78. runs-on: ubuntu-latest
  79. timeout-minutes: 30
  80. strategy:
  81. matrix:
  82. case:
  83. - name: Tenant
  84. class: org.apache.dolphinscheduler.e2e.cases.TenantE2ETest
  85. - name: User
  86. class: org.apache.dolphinscheduler.e2e.cases.UserE2ETest
  87. - name: WorkerGroup
  88. class: org.apache.dolphinscheduler.e2e.cases.WorkerGroupE2ETest
  89. - name: Project
  90. class: org.apache.dolphinscheduler.e2e.cases.ProjectE2ETest
  91. - name: Queue
  92. class: org.apache.dolphinscheduler.e2e.cases.QueueE2ETest
  93. - name: Environment
  94. class: org.apache.dolphinscheduler.e2e.cases.EnvironmentE2ETest
  95. - name: Token
  96. class: org.apache.dolphinscheduler.e2e.cases.TokenE2ETest
  97. - name: Workflow
  98. class: org.apache.dolphinscheduler.e2e.cases.WorkflowE2ETest
  99. # - name: WorkflowForSwitch
  100. # class: org.apache.dolphinscheduler.e2e.cases.WorkflowSwitchE2ETest
  101. - name: FileManage
  102. class: org.apache.dolphinscheduler.e2e.cases.FileManageE2ETest
  103. - name: UdfManage
  104. class: org.apache.dolphinscheduler.e2e.cases.UdfManageE2ETest
  105. - name: FunctionManage
  106. class: org.apache.dolphinscheduler.e2e.cases.FunctionManageE2ETest
  107. - name: MysqlDataSource
  108. class: org.apache.dolphinscheduler.e2e.cases.MysqlDataSourceE2ETest
  109. - name: ClickhouseDataSource
  110. class: org.apache.dolphinscheduler.e2e.cases.ClickhouseDataSourceE2ETest
  111. - name: PostgresDataSource
  112. class: org.apache.dolphinscheduler.e2e.cases.PostgresDataSourceE2ETest
  113. - name: SqlServerDataSource
  114. class: org.apache.dolphinscheduler.e2e.cases.SqlServerDataSourceE2ETest
  115. - name: HiveDataSource
  116. class: org.apache.dolphinscheduler.e2e.cases.HiveDataSourceE2ETest
  117. env:
  118. RECORDING_PATH: /tmp/recording-${{ matrix.case.name }}
  119. steps:
  120. - uses: actions/checkout@v2
  121. with:
  122. submodules: true
  123. - name: Cache local Maven repository
  124. uses: actions/cache@v2
  125. with:
  126. path: ~/.m2/repository
  127. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
  128. restore-keys: ${{ runner.os }}-maven-
  129. - uses: actions/download-artifact@v2
  130. name: Download Docker Images
  131. with:
  132. name: standalone-image
  133. path: /tmp
  134. - name: Load Docker Images
  135. run: |
  136. docker load -i /tmp/standalone-image.tar
  137. - name: Run Test
  138. run: |
  139. ./mvnw -B -f dolphinscheduler-e2e/pom.xml -am \
  140. -DfailIfNoTests=false \
  141. -Dtest=${{ matrix.case.class }} test
  142. - uses: actions/upload-artifact@v2
  143. if: always()
  144. name: Upload Recording
  145. with:
  146. name: recording-${{ matrix.case.name }}
  147. path: ${{ env.RECORDING_PATH }}
  148. retention-days: 1
  149. result:
  150. name: E2E
  151. runs-on: ubuntu-latest
  152. timeout-minutes: 30
  153. needs: [ e2e ]
  154. if: always()
  155. steps:
  156. - name: Status
  157. run: |
  158. if [[ ${{ needs.e2e.result }} == 'success' || ${{ needs.paths-filter.outputs.ignore == 'true' }} ]]; then
  159. echo "Passed!"
  160. else
  161. exit -1
  162. fi