diff --git a/.github/workflows/java_client_compatibility.yaml b/.github/workflows/java_client_compatibility.yaml index ccaf248..255daa5 100644 --- a/.github/workflows/java_client_compatibility.yaml +++ b/.github/workflows/java_client_compatibility.yaml @@ -37,9 +37,13 @@ jobs: strategy: fail-fast: false matrix: - server-version: ${{ fromJson(needs.setup_server_matrix.outputs.matrix) }} - kind: [ os, enterprise ] - name: Test Java client ${{ github.event.inputs.branch_name }} branch against ${{ matrix.kind }} ${{ matrix.server-version }} server + server_version: ${{ fromJson(needs.setup_server_matrix.outputs.matrix) }} + server_kind: [ os, enterprise ] + tests_type: [ os, enterprise ] + exclude: + - server_kind: os + tests_type: enterprise + name: Test Java client ${{ github.event.inputs.branch_name }} branch running ${{ matrix.tests_type }} tests against ${{ matrix.server_kind }} ${{ matrix.server_version }} server steps: - name: Checkout to scripts uses: actions/checkout@v4 @@ -73,25 +77,41 @@ jobs: uses: madhead/semver-utils@latest id: version with: - version: ${{ matrix.server-version }} + version: ${{ matrix.server_version }} compare-to: 5.3.0 - name: Set up HZ_LICENSEKEY env - if: ${{ matrix.kind == 'enterprise' }} + if: ${{ matrix.server_kind == 'enterprise' }} run: | echo "HZ_LICENSEKEY=${{ '>' == steps.version.outputs.comparison-result && secrets.HAZELCAST_ENTERPRISE_KEY || secrets.HAZELCAST_ENTERPRISE_KEY_V5 }}" >> $GITHUB_ENV + - name: Build modules + shell: bash -l {0} + run: | + chmod +x mvnw + ./mvnw -B -V -e clean install -DskipTests + working-directory: client + - name: Run non-enterprise tests + if: ${{ matrix.tests_type == 'os' }} shell: bash -l {0} run: | chmod +x mvnw - ./mvnw -B -V -e install -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ matrix.server-version }} + ./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ matrix.server_version }} working-directory: client/hazelcast-java-client + - name: Run enterprise Vector tests + if: ${{ matrix.server_kind == 'enterprise' && matrix.tests_type == 'enterprise' }} + shell: bash -l {0} + run: | + chmod +x mvnw + ./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ matrix.server_version }} + working-directory: client/hazelcast-enterprise-java-client-vector + - name: Run enterprise tests - if: ${{ matrix.kind == 'enterprise' }} + if: ${{ matrix.server_kind == 'enterprise' && matrix.tests_type == 'enterprise' }} shell: bash -l {0} run: | chmod +x mvnw - ./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ matrix.server-version }} + ./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ matrix.server_version }} working-directory: client/hazelcast-enterprise-java-client diff --git a/.github/workflows/server_compatibility.yaml b/.github/workflows/server_compatibility.yaml index 388c4ff..56daf25 100644 --- a/.github/workflows/server_compatibility.yaml +++ b/.github/workflows/server_compatibility.yaml @@ -808,8 +808,11 @@ jobs: matrix: client_tag: ${{ fromJson(needs.setup_java_client_matrix.outputs.matrix) }} server_kind: [ os, enterprise ] - - name: Test Java Thin client ${{ matrix.client_tag }} with ${{ matrix.server_kind }} server + tests_type: [ os, enterprise ] + exclude: + - server_kind: os + tests_type: enterprise + name: Test Java client (standalone) ${{ matrix.client_tag }} branch running ${{ matrix.tests_type }} tests against ${{ matrix.server_kind }} server steps: - name: Set up enterprise license key if: ${{ github.event.inputs.hz_version < '5.5' }} @@ -909,14 +912,31 @@ jobs: run: | echo "HZ_LICENSEKEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}" >> $GITHUB_ENV + - name: Build modules + shell: bash -l {0} + run: | + chmod +x mvnw + ./mvnw -B -V -e clean install -DskipTests + working-directory: client + - name: Run non-enterprise tests + if: ${{ matrix.tests_type == 'os' }} + shell: bash -l {0} run: | chmod +x mvnw - ./mvnw -B -V -e install -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ needs.upload_jars.outputs.hz_server_version }} + ./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ needs.upload_jars.outputs.hz_server_version }} working-directory: java-client/hazelcast-java-client + - name: Run enterprise Vector tests + if: ${{ matrix.server_kind == 'enterprise' && matrix.tests_type == 'enterprise' }} + shell: bash -l {0} + run: | + chmod +x mvnw + ./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ needs.upload_jars.outputs.hz_server_version }} + working-directory: client/hazelcast-enterprise-java-client-vector + - name: Run enterprise tests - if: ${{ matrix.server_kind == 'enterprise' }} + if: ${{ matrix.server_kind == 'enterprise' && matrix.tests_type == 'enterprise' }} shell: bash -l {0} run: | chmod +x mvnw