From 15b61336f7934e126166ab9c9bff5be177b76fcb Mon Sep 17 00:00:00 2001 From: emreyigit Date: Fri, 17 May 2024 14:33:06 +0300 Subject: [PATCH 01/10] Add condition --- .github/workflows/csharp_client_compatibility.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/csharp_client_compatibility.yaml b/.github/workflows/csharp_client_compatibility.yaml index 598227d3..4e73f5d6 100644 --- a/.github/workflows/csharp_client_compatibility.yaml +++ b/.github/workflows/csharp_client_compatibility.yaml @@ -55,6 +55,12 @@ jobs: 6.0.x 7.0.x 8.0.x + + - uses: madhead/semver-utils@latest + id: version + with: + version: ${{ matrix.version }} + compare-to: 5.4.0 - name: Read Java Config uses: pietrobolcato/action-read-yaml@9f13718d61111b69f30ab4ac683e67a56d254e1d @@ -94,7 +100,7 @@ jobs: run: ./hz.ps1 -enterprise -noRestore -localRestore -server ${{ matrix.version }} test ${{ secrets.GH_PAT }} working-directory: client env: - HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} + HAZELCAST_ENTERPRISE_KEY: ${{ ">=" == steps.comparison.outputs.comparison-result && secrets.HAZELCAST_ENTERPRISE_KEY || secrets.HAZELCAST_ENTERPRISE_KEY_V5 }} HAZELCAST_SERVER_VERSION: ${{ matrix.version }} From 5acfc688d0e8d1de1b4fe3a1053a014f5171e32a Mon Sep 17 00:00:00 2001 From: emreyigit Date: Fri, 17 May 2024 15:03:08 +0300 Subject: [PATCH 02/10] Fix condition --- .github/workflows/csharp_client_compatibility.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/csharp_client_compatibility.yaml b/.github/workflows/csharp_client_compatibility.yaml index 4e73f5d6..b326c208 100644 --- a/.github/workflows/csharp_client_compatibility.yaml +++ b/.github/workflows/csharp_client_compatibility.yaml @@ -100,7 +100,7 @@ jobs: run: ./hz.ps1 -enterprise -noRestore -localRestore -server ${{ matrix.version }} test ${{ secrets.GH_PAT }} working-directory: client env: - HAZELCAST_ENTERPRISE_KEY: ${{ ">=" == steps.comparison.outputs.comparison-result && secrets.HAZELCAST_ENTERPRISE_KEY || secrets.HAZELCAST_ENTERPRISE_KEY_V5 }} + HAZELCAST_ENTERPRISE_KEY: ${{ '>=' == steps.comparison.outputs.comparison-result && secrets.HAZELCAST_ENTERPRISE_KEY || secrets.HAZELCAST_ENTERPRISE_KEY_V5 }} HAZELCAST_SERVER_VERSION: ${{ matrix.version }} From 9b56017175d972735cefd6105b419c4ec6ec8919 Mon Sep 17 00:00:00 2001 From: emreyigit Date: Fri, 17 May 2024 16:10:36 +0300 Subject: [PATCH 03/10] Remove older .Net versions --- .github/workflows/csharp_client_compatibility.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/csharp_client_compatibility.yaml b/.github/workflows/csharp_client_compatibility.yaml index b326c208..ab2b56f4 100644 --- a/.github/workflows/csharp_client_compatibility.yaml +++ b/.github/workflows/csharp_client_compatibility.yaml @@ -49,11 +49,6 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | - 2.1.x - 3.1.x - 5.0.x - 6.0.x - 7.0.x 8.0.x - uses: madhead/semver-utils@latest From 19593e0e5ead7cd61a39418930c02d75fc62741a Mon Sep 17 00:00:00 2001 From: emreyigit Date: Fri, 17 May 2024 20:35:04 +0300 Subject: [PATCH 04/10] check condition --- .../workflows/csharp_client_compatibility.yaml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/csharp_client_compatibility.yaml b/.github/workflows/csharp_client_compatibility.yaml index ab2b56f4..ec545dd7 100644 --- a/.github/workflows/csharp_client_compatibility.yaml +++ b/.github/workflows/csharp_client_compatibility.yaml @@ -52,10 +52,11 @@ jobs: 8.0.x - uses: madhead/semver-utils@latest + name: Check Server Version id: version with: version: ${{ matrix.version }} - compare-to: 5.4.0 + compare-to: 5.3.0 - name: Read Java Config uses: pietrobolcato/action-read-yaml@9f13718d61111b69f30ab4ac683e67a56d254e1d @@ -89,13 +90,9 @@ jobs: working-directory: client env: HAZELCAST_SERVER_VERSION: ${{ matrix.version }} - - name: Run all tests - shell: pwsh - if: ${{ matrix.kind == 'enterprise' }} - run: ./hz.ps1 -enterprise -noRestore -localRestore -server ${{ matrix.version }} test ${{ secrets.GH_PAT }} - working-directory: client - env: - HAZELCAST_ENTERPRISE_KEY: ${{ '>=' == steps.comparison.outputs.comparison-result && secrets.HAZELCAST_ENTERPRISE_KEY || secrets.HAZELCAST_ENTERPRISE_KEY_V5 }} - HAZELCAST_SERVER_VERSION: ${{ matrix.version }} + + - name: test version check + run: echo ${{ '>' == steps.comparison.outputs.comparison-result && 'option1' || 'option2' }} + From a344894e3a0c18c749a42b20a7e60dae3f0450fb Mon Sep 17 00:00:00 2001 From: emreyigit Date: Fri, 17 May 2024 20:43:04 +0300 Subject: [PATCH 05/10] test condition --- .github/workflows/csharp_client_compatibility.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/csharp_client_compatibility.yaml b/.github/workflows/csharp_client_compatibility.yaml index ec545dd7..2ac4a98b 100644 --- a/.github/workflows/csharp_client_compatibility.yaml +++ b/.github/workflows/csharp_client_compatibility.yaml @@ -79,6 +79,10 @@ jobs: run: | git submodule update --init working-directory: client + + - name: test version check + run: echo ${{ steps.comparison.outputs.comparison-result }} + - name: Build shell: pwsh run: ./hz.ps1 -localRestore build From 9dd4f982233cdb13481c58c92b36fcf39ce1618f Mon Sep 17 00:00:00 2001 From: emreyigit Date: Fri, 17 May 2024 20:45:22 +0300 Subject: [PATCH 06/10] fix name --- .github/workflows/csharp_client_compatibility.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/csharp_client_compatibility.yaml b/.github/workflows/csharp_client_compatibility.yaml index 2ac4a98b..d9cdf7c8 100644 --- a/.github/workflows/csharp_client_compatibility.yaml +++ b/.github/workflows/csharp_client_compatibility.yaml @@ -81,7 +81,7 @@ jobs: working-directory: client - name: test version check - run: echo ${{ steps.comparison.outputs.comparison-result }} + run: echo ${{ version.comparison.outputs.comparison-result }} - name: Build shell: pwsh From 596d05b91e3b749e73c01a9c7e7b4b0e8805efb6 Mon Sep 17 00:00:00 2001 From: emreyigit Date: Fri, 17 May 2024 20:47:16 +0300 Subject: [PATCH 07/10] fix name --- .github/workflows/csharp_client_compatibility.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/csharp_client_compatibility.yaml b/.github/workflows/csharp_client_compatibility.yaml index d9cdf7c8..04d08408 100644 --- a/.github/workflows/csharp_client_compatibility.yaml +++ b/.github/workflows/csharp_client_compatibility.yaml @@ -81,7 +81,7 @@ jobs: working-directory: client - name: test version check - run: echo ${{ version.comparison.outputs.comparison-result }} + run: echo ${{ steps.version.outputs.comparison-result }} - name: Build shell: pwsh From 51883d1f48d496bbf9d799acb7a9cc845426ec40 Mon Sep 17 00:00:00 2001 From: emreyigit Date: Mon, 20 May 2024 11:39:08 +0300 Subject: [PATCH 08/10] TEst condition --- .../csharp_client_compatibility.yaml | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/csharp_client_compatibility.yaml b/.github/workflows/csharp_client_compatibility.yaml index 04d08408..545099ce 100644 --- a/.github/workflows/csharp_client_compatibility.yaml +++ b/.github/workflows/csharp_client_compatibility.yaml @@ -57,6 +57,9 @@ jobs: with: version: ${{ matrix.version }} compare-to: 5.3.0 + + - name: test version check + run: echo "${{ '>' == steps.comparison.outputs.comparison-result && 'option1' || 'option2' }}" - name: Read Java Config uses: pietrobolcato/action-read-yaml@9f13718d61111b69f30ab4ac683e67a56d254e1d @@ -79,10 +82,6 @@ jobs: run: | git submodule update --init working-directory: client - - - name: test version check - run: echo ${{ steps.version.outputs.comparison-result }} - - name: Build shell: pwsh run: ./hz.ps1 -localRestore build @@ -95,8 +94,15 @@ jobs: env: HAZELCAST_SERVER_VERSION: ${{ matrix.version }} - - name: test version check - run: echo ${{ '>' == steps.comparison.outputs.comparison-result && 'option1' || 'option2' }} - + + + - name: Run all tests + shell: pwsh + if: ${{ matrix.kind == 'enterprise' }} + run: ./hz.ps1 -enterprise -noRestore -localRestore -server ${{ matrix.version }} test ${{ secrets.GH_PAT }} + working-directory: client + env: + HAZELCAST_ENTERPRISE_KEY: ${{ '>' == steps.comparison.outputs.comparison-result && secrets.HAZELCAST_ENTERPRISE_KEY || secrets.HAZELCAST_ENTERPRISE_KEY_V5 }} + HAZELCAST_SERVER_VERSION: ${{ matrix.version }} From 4fefe1b9fc8190415dadc0a3b87608512e0d613e Mon Sep 17 00:00:00 2001 From: emreyigit Date: Mon, 20 May 2024 11:51:37 +0300 Subject: [PATCH 09/10] fix condition --- .github/workflows/csharp_client_compatibility.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/csharp_client_compatibility.yaml b/.github/workflows/csharp_client_compatibility.yaml index 545099ce..86c47c8c 100644 --- a/.github/workflows/csharp_client_compatibility.yaml +++ b/.github/workflows/csharp_client_compatibility.yaml @@ -59,7 +59,7 @@ jobs: compare-to: 5.3.0 - name: test version check - run: echo "${{ '>' == steps.comparison.outputs.comparison-result && 'option1' || 'option2' }}" + run: echo "${{ '>' == steps.version.outputs.comparison-result && 'option1' || 'option2' }}" - name: Read Java Config uses: pietrobolcato/action-read-yaml@9f13718d61111b69f30ab4ac683e67a56d254e1d @@ -102,7 +102,7 @@ jobs: run: ./hz.ps1 -enterprise -noRestore -localRestore -server ${{ matrix.version }} test ${{ secrets.GH_PAT }} working-directory: client env: - HAZELCAST_ENTERPRISE_KEY: ${{ '>' == steps.comparison.outputs.comparison-result && secrets.HAZELCAST_ENTERPRISE_KEY || secrets.HAZELCAST_ENTERPRISE_KEY_V5 }} + HAZELCAST_ENTERPRISE_KEY: ${{ '>' == steps.version.outputs.comparison-result && secrets.HAZELCAST_ENTERPRISE_KEY || secrets.HAZELCAST_ENTERPRISE_KEY_V5 }} HAZELCAST_SERVER_VERSION: ${{ matrix.version }} From 0eeae7d3e3b637ac333b8421ec9e404b1bf12cca Mon Sep 17 00:00:00 2001 From: emreyigit Date: Mon, 20 May 2024 13:45:56 +0300 Subject: [PATCH 10/10] Introduce fix to licence version issue. --- .../csharp_client_compatibility.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/csharp_client_compatibility.yaml b/.github/workflows/csharp_client_compatibility.yaml index 86c47c8c..a47ffcd0 100644 --- a/.github/workflows/csharp_client_compatibility.yaml +++ b/.github/workflows/csharp_client_compatibility.yaml @@ -23,11 +23,14 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.9 + - name: Checkout to scripts uses: actions/checkout@v2 + - name: Set server matrix id: set-matrix run: echo "::set-output name=matrix::$( python get_server_matrix.py )" + test_client: needs: [setup_server_matrix] runs-on: ${{ matrix.os }} @@ -37,14 +40,17 @@ jobs: version: ${{ fromJson(needs.setup_server_matrix.outputs.matrix) }} kind: [os, enterprise] os: [ ubuntu-latest, windows-latest ] + name: Test CSharp ${{ github.event.inputs.branch_name }} branch against ${{ matrix.kind }} ${{ matrix.version }} server on ${{ matrix.os }} steps: - name: Checkout to scripts uses: actions/checkout@v4 + - name: Setup Python uses: actions/setup-python@v2 with: python-version: 3.9 + - name: Install .NET uses: actions/setup-dotnet@v3 with: @@ -52,14 +58,11 @@ jobs: 8.0.x - uses: madhead/semver-utils@latest - name: Check Server Version + name: Check Server Version to Determine License Version id: version with: version: ${{ matrix.version }} compare-to: 5.3.0 - - - name: test version check - run: echo "${{ '>' == steps.version.outputs.comparison-result && 'option1' || 'option2' }}" - name: Read Java Config uses: pietrobolcato/action-read-yaml@9f13718d61111b69f30ab4ac683e67a56d254e1d @@ -72,29 +75,31 @@ jobs: with: java-version: ${{ steps.java-config.outputs['java-version'] }} distribution: ${{ steps.java-config.outputs['distribution'] }} + - name: Checkout to ${{ github.event.inputs.branch_name }} uses: actions/checkout@v2 with: repository: ${{ github.event.inputs.organization_name }}/hazelcast-csharp-client path: client ref: ${{ github.event.inputs.branch_name }} + - name: Update submodules run: | git submodule update --init working-directory: client + - name: Build shell: pwsh run: ./hz.ps1 -localRestore build working-directory: client + - name: Run non-enterprise tests shell: pwsh if: ${{ matrix.kind == 'os' }} run: ./hz.ps1 -server ${{ matrix.version }} test working-directory: client env: - HAZELCAST_SERVER_VERSION: ${{ matrix.version }} - - + HAZELCAST_SERVER_VERSION: ${{ matrix.version }} - name: Run all tests shell: pwsh