|
25 | 25 | description: 'space-separated changed catalogs-contrib module names, or __all__' |
26 | 26 | type: string |
27 | 27 | default: '' |
| 28 | + maintenance_only: |
| 29 | + required: false |
| 30 | + description: 'run only maintenance integration tests' |
| 31 | + type: boolean |
| 32 | + default: false |
28 | 33 |
|
29 | 34 | jobs: |
30 | 35 | start-runner: |
@@ -66,26 +71,57 @@ jobs: |
66 | 71 | - name: Backend Integration Test (JDK${{ inputs.java-version }}-${{ inputs.test-mode }}-${{ inputs.backend }}) |
67 | 72 | id: integrationTest |
68 | 73 | run: | |
69 | | - ALL_CONTRIB_MODULES="$(find catalogs-contrib -mindepth 1 -maxdepth 1 -type d -name 'catalog-*' -exec basename {} \; | sort)" |
70 | | - CHANGED_CONTRIB_MODULES="${{ inputs.changed-catalogs-contrib-modules }}" |
| 74 | + gradle_args=( |
| 75 | + -PskipTests |
| 76 | + -PtestMode=${{ inputs.test-mode }} |
| 77 | + -PjdbcBackend=${{ inputs.backend }} |
| 78 | + -PskipDockerTests=false |
| 79 | + ) |
| 80 | +
|
| 81 | + if [ "${{ inputs.maintenance_only }}" = "true" ]; then |
| 82 | + gradle_args+=( |
| 83 | + :maintenance:optimizer:test |
| 84 | + :maintenance:jobs:test |
| 85 | + ) |
| 86 | + else |
| 87 | + ALL_CONTRIB_MODULES="$(find catalogs-contrib -mindepth 1 -maxdepth 1 -type d -name 'catalog-*' -exec basename {} \; | sort)" |
| 88 | + CHANGED_CONTRIB_MODULES="${{ inputs.changed-catalogs-contrib-modules }}" |
| 89 | +
|
| 90 | + gradle_args+=( |
| 91 | + test |
| 92 | + -x :web:web:test |
| 93 | + -x :web:integration-test:test |
| 94 | + -x :web-v2:web:test |
| 95 | + -x :web-v2:integration-test:test |
| 96 | + -x :clients:client-python:test |
| 97 | + -x :flink-connector:flink:test |
| 98 | + -x :spark-connector:spark-common:test |
| 99 | + -x :spark-connector:spark-3.3:test |
| 100 | + -x :spark-connector:spark-3.4:test |
| 101 | + -x :spark-connector:spark-3.5:test |
| 102 | + -x :spark-connector:spark-runtime-3.3:test |
| 103 | + -x :spark-connector:spark-runtime-3.4:test |
| 104 | + -x :spark-connector:spark-runtime-3.5:test |
| 105 | + -x :trino-connector:integration-test:test |
| 106 | + -x :trino-connector:trino-connector:test |
| 107 | + -x :authorizations:authorization-chain:test |
| 108 | + -x :authorizations:authorization-ranger:test |
| 109 | + -x :clients:cli:test |
| 110 | + ) |
71 | 111 |
|
72 | | - EXCLUDE_CONTRIB_TESTS="" |
73 | | - if [ "$CHANGED_CONTRIB_MODULES" != "__all__" ]; then |
74 | | - for module in $ALL_CONTRIB_MODULES; do |
75 | | - if [[ " $CHANGED_CONTRIB_MODULES " != *" $module "* ]]; then |
76 | | - EXCLUDE_CONTRIB_TESTS="$EXCLUDE_CONTRIB_TESTS -x :catalogs-contrib:$module:test" |
77 | | - fi |
78 | | - done |
| 112 | + if [ "$CHANGED_CONTRIB_MODULES" != "__all__" ]; then |
| 113 | + for module in $ALL_CONTRIB_MODULES; do |
| 114 | + if [[ " $CHANGED_CONTRIB_MODULES " != *" $module "* ]]; then |
| 115 | + gradle_args+=("-x" ":catalogs-contrib:$module:test") |
| 116 | + fi |
| 117 | + done |
| 118 | + fi |
79 | 119 | fi |
80 | 120 |
|
81 | | - ./gradlew test -PskipTests -PtestMode=${{ inputs.test-mode }} -PjdbcBackend=${{ inputs.backend }} -PskipDockerTests=false \ |
82 | | - -x :web:web:test -x :web:integration-test:test -x :web-v2:web:test -x :web-v2:integration-test:test -x :clients:client-python:test -x :flink-connector:flink:test -x :spark-connector:spark-common:test \ |
83 | | - -x :spark-connector:spark-3.3:test -x :spark-connector:spark-3.4:test -x :spark-connector:spark-3.5:test \ |
84 | | - -x :spark-connector:spark-runtime-3.3:test -x :spark-connector:spark-runtime-3.4:test -x :spark-connector:spark-runtime-3.5:test \ |
85 | | - -x :trino-connector:integration-test:test -x :trino-connector:trino-connector:test \ |
86 | | - -x :authorizations:authorization-chain:test -x :authorizations:authorization-ranger:test \ |
87 | | - -x :clients:cli:test -x :maintenance:jobs:test -x :maintenance:optimizer:test \ |
88 | | - $EXCLUDE_CONTRIB_TESTS |
| 121 | + printf './gradlew' |
| 122 | + printf ' %q' "${gradle_args[@]}" |
| 123 | + printf '\n' |
| 124 | + ./gradlew "${gradle_args[@]}" |
89 | 125 |
|
90 | 126 | - name: Upload integrate tests reports |
91 | 127 | uses: actions/upload-artifact@v7 |
|
0 commit comments