integration-tests-on-release.yaml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. name: Integration tests on master/release
  2. on:
  3. push:
  4. tags:
  5. - v*
  6. branches:
  7. - master
  8. - release-*
  9. defaults:
  10. run:
  11. # reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
  12. shell: bash --noprofile --norc -eo pipefail -x {0}
  13. jobs:
  14. TestCephHelmSuite:
  15. runs-on: ubuntu-20.04
  16. strategy:
  17. fail-fast: false
  18. matrix:
  19. kubernetes-versions: ["v1.23.17", "v1.25.16", "v1.27.8", "v1.29.0"]
  20. steps:
  21. - name: checkout
  22. uses: actions/checkout@v4
  23. with:
  24. fetch-depth: 0
  25. - name: setup cluster resources
  26. uses: ./.github/workflows/integration-test-config-latest-k8s
  27. with:
  28. github-token: ${{ secrets.GITHUB_TOKEN }}
  29. kubernetes-version: ${{ matrix.kubernetes-versions }}
  30. - name: TestCephHelmSuite
  31. run: |
  32. tests/scripts/github-action-helper.sh collect_udev_logs_in_background
  33. tests/scripts/github-action-helper.sh create_helm_tag
  34. tests/scripts/helm.sh up
  35. export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
  36. SKIP_TEST_CLEANUP=false SKIP_CLEANUP_POLICY=false go test -v -timeout 1800s -run CephHelmSuite github.com/rook/rook/tests/integration
  37. - name: collect common logs
  38. if: always()
  39. run: |
  40. export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
  41. export CLUSTER_NAMESPACE="helm-ns"
  42. export OPERATOR_NAMESPACE="helm-ns-system"
  43. tests/scripts/collect-logs.sh
  44. - name: Artifact
  45. uses: actions/upload-artifact@v4
  46. if: failure()
  47. with:
  48. name: ceph-helm-suite-artifact-${{ matrix.kubernetes-versions }}
  49. path: /home/runner/work/rook/rook/tests/integration/_output/tests/
  50. TestCephMultiClusterDeploySuite:
  51. runs-on: ubuntu-20.04
  52. strategy:
  53. fail-fast: false
  54. matrix:
  55. kubernetes-versions: ["v1.23.17", "v1.25.16", "v1.27.8", "v1.29.0"]
  56. steps:
  57. - name: checkout
  58. uses: actions/checkout@v4
  59. with:
  60. fetch-depth: 0
  61. - name: setup latest cluster resources
  62. uses: ./.github/workflows/integration-test-config-latest-k8s
  63. with:
  64. github-token: ${{ secrets.GITHUB_TOKEN }}
  65. kubernetes-version: ${{ matrix.kubernetes-versions }}
  66. - name: TestCephMultiClusterDeploySuite
  67. run: |
  68. tests/scripts/github-action-helper.sh collect_udev_logs_in_background
  69. export TEST_SCRATCH_DEVICE=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1)1
  70. export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
  71. go test -v -timeout 1800s -run CephMultiClusterDeploySuite github.com/rook/rook/tests/integration
  72. - name: collect common logs
  73. if: always()
  74. run: |
  75. export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
  76. export OPERATOR_NAMESPACE="multi-core-system"
  77. CLUSTER_NAMESPACE="multi-core" tests/scripts/collect-logs.sh
  78. CLUSTER_NAMESPACE="multi-external" tests/scripts/collect-logs.sh
  79. - name: Artifact
  80. uses: actions/upload-artifact@v4
  81. if: failure()
  82. with:
  83. name: ceph-multi-cluster-deploy-suite-artifact-${{ matrix.kubernetes-versions }}
  84. path: /home/runner/work/rook/rook/tests/integration/_output/tests/
  85. TestCephSmokeSuite:
  86. runs-on: ubuntu-20.04
  87. strategy:
  88. fail-fast: false
  89. matrix:
  90. kubernetes-versions: ["v1.23.17", "v1.25.16", "v1.27.8", "v1.29.0"]
  91. steps:
  92. - name: checkout
  93. uses: actions/checkout@v4
  94. with:
  95. fetch-depth: 0
  96. - name: setup latest cluster resources
  97. uses: ./.github/workflows/integration-test-config-latest-k8s
  98. with:
  99. github-token: ${{ secrets.GITHUB_TOKEN }}
  100. kubernetes-version: ${{ matrix.kubernetes-versions }}
  101. - name: TestCephSmokeSuite
  102. run: |
  103. tests/scripts/github-action-helper.sh collect_udev_logs_in_background
  104. export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
  105. SKIP_CLEANUP_POLICY=false go test -v -timeout 1800s -run CephSmokeSuite github.com/rook/rook/tests/integration
  106. - name: collect common logs
  107. if: always()
  108. run: |
  109. export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
  110. export CLUSTER_NAMESPACE="smoke-ns"
  111. export OPERATOR_NAMESPACE="smoke-ns-system"
  112. tests/scripts/collect-logs.sh
  113. - name: Artifact
  114. uses: actions/upload-artifact@v4
  115. if: failure()
  116. with:
  117. name: ceph-smoke-suite-artifact-${{ matrix.kubernetes-versions }}
  118. path: /home/runner/work/rook/rook/tests/integration/_output/tests/
  119. TestCephUpgradeSuite:
  120. runs-on: ubuntu-20.04
  121. strategy:
  122. fail-fast: false
  123. matrix:
  124. kubernetes-versions: ["v1.23.17", "v1.25.16", "v1.27.8", "v1.29.0"]
  125. steps:
  126. - name: checkout
  127. uses: actions/checkout@v4
  128. with:
  129. fetch-depth: 0
  130. - name: setup latest cluster resources
  131. uses: ./.github/workflows/integration-test-config-latest-k8s
  132. with:
  133. github-token: ${{ secrets.GITHUB_TOKEN }}
  134. kubernetes-version: ${{ matrix.kubernetes-versions }}
  135. - name: TestCephUpgradeSuite
  136. run: |
  137. tests/scripts/github-action-helper.sh collect_udev_logs_in_background
  138. export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
  139. go test -v -timeout 2400s -run CephUpgradeSuite/TestUpgradeRook github.com/rook/rook/tests/integration
  140. - name: collect common logs
  141. if: always()
  142. run: |
  143. export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
  144. export CLUSTER_NAMESPACE="upgrade"
  145. export OPERATOR_NAMESPACE="upgrade-system"
  146. tests/scripts/collect-logs.sh
  147. - name: Artifact
  148. uses: actions/upload-artifact@v4
  149. if: failure()
  150. with:
  151. name: ceph-upgrade-suite-artifact-${{ matrix.kubernetes-versions }}
  152. path: /home/runner/work/rook/rook/tests/integration/_output/tests/
  153. TestHelmUpgradeSuite:
  154. runs-on: ubuntu-20.04
  155. strategy:
  156. fail-fast: false
  157. matrix:
  158. kubernetes-versions: ["v1.23.17", "v1.26.11", "v1.29.0"]
  159. steps:
  160. - name: checkout
  161. uses: actions/checkout@v4
  162. with:
  163. fetch-depth: 0
  164. - name: setup cluster resources
  165. uses: ./.github/workflows/integration-test-config-latest-k8s
  166. with:
  167. github-token: ${{ secrets.GITHUB_TOKEN }}
  168. kubernetes-version: ${{ matrix.kubernetes-versions }}
  169. - name: TestHelmUpgradeSuite
  170. run: |
  171. tests/scripts/github-action-helper.sh create_helm_tag
  172. tests/scripts/helm.sh up
  173. tests/scripts/github-action-helper.sh collect_udev_logs_in_background
  174. export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
  175. go test -v -timeout 1800s -run CephUpgradeSuite/TestUpgradeHelm github.com/rook/rook/tests/integration
  176. - name: collect common logs
  177. if: always()
  178. run: |
  179. export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
  180. export CLUSTER_NAMESPACE="upgrade"
  181. export OPERATOR_NAMESPACE="upgrade-system"
  182. tests/scripts/collect-logs.sh
  183. - name: Artifact
  184. uses: actions/upload-artifact@v4
  185. if: failure()
  186. with:
  187. name: ceph-upgrade-suite-artifact-${{ matrix.kubernetes-versions }}
  188. path: /home/runner/work/rook/rook/tests/integration/_output/tests/
  189. TestCephObjectSuite:
  190. runs-on: ubuntu-20.04
  191. strategy:
  192. fail-fast: false
  193. matrix:
  194. kubernetes-versions: ["v1.23.17", "v1.29.0"]
  195. steps:
  196. - name: checkout
  197. uses: actions/checkout@v4
  198. with:
  199. fetch-depth: 0
  200. - name: setup latest cluster resources
  201. uses: ./.github/workflows/integration-test-config-latest-k8s
  202. with:
  203. github-token: ${{ secrets.GITHUB_TOKEN }}
  204. kubernetes-version: ${{ matrix.kubernetes-versions }}
  205. - name: TestCephObjectSuite
  206. run: |
  207. tests/scripts/github-action-helper.sh collect_udev_logs_in_background
  208. export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
  209. SKIP_CLEANUP_POLICY=false go test -v -timeout 2400s -failfast -run CephObjectSuite github.com/rook/rook/tests/integration
  210. - name: collect common logs
  211. if: always()
  212. run: |
  213. export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
  214. export CLUSTER_NAMESPACE="object-ns"
  215. export OPERATOR_NAMESPACE="object-ns-system"
  216. tests/scripts/collect-logs.sh
  217. - name: Artifact
  218. uses: actions/upload-artifact@v4
  219. if: failure()
  220. with:
  221. name: ceph-object-suite-artifact-${{ matrix.kubernetes-versions }}
  222. path: /home/runner/work/rook/rook/tests/integration/_output/tests/