-
Notifications
You must be signed in to change notification settings - Fork 61
[HZ-5339] Use RCD as the test runner #1569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8b95c11
460a934
9a4e3de
57a141e
78383da
9b4f2d6
790d24c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,7 @@ jobs: | |
| strategy: | ||
| matrix: | ||
| os: [ ubuntu-latest, windows-latest ] | ||
|
|
||
| hz_version: [ "5.6.0" ] | ||
| steps: | ||
| - name: Checkout code for PR | ||
| if: github.event_name == 'pull_request_target' | ||
|
|
@@ -74,27 +74,89 @@ jobs: | |
| with: | ||
| node-version: ${{ needs.node-versions.outputs.default-version }} | ||
|
|
||
| - name: Checkout to test artifacts | ||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@v5 | ||
| with: | ||
| role-to-assume: ${{ secrets.AWS_HAZELCAST_OIDC_GITHUB_ACTIONS_ROLE_ARN }} | ||
| aws-region: 'us-east-1' | ||
|
|
||
| - name: Get Secrets | ||
| uses: aws-actions/aws-secretsmanager-get-secrets@v2 | ||
| with: | ||
| secret-ids: | | ||
| HAZELCAST_ENTERPRISE_KEY,CN/HZ_LICENSE_KEY | ||
|
|
||
| - name: Checkout to certificates | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: hazelcast/private-test-artifacts | ||
| path: certs | ||
| ref: data | ||
| token: ${{ secrets.GH_TOKEN }} | ||
| repository: hazelcast/private-test-artifacts | ||
| path: certs | ||
| ref: data | ||
| token: ${{ secrets.GH_TOKEN }} | ||
|
|
||
| - name: Copy certificates JAR to destination with the appropriate name | ||
| run: | | ||
| cp ${{ github.workspace }}/certs/certs.jar ${{ github.workspace }}/certs.jar | ||
| unzip -p ${{ github.workspace }}/certs.jar com/hazelcast/nio/ssl/letsencrypt.jks > test/integration/backward_compatible/parallel/ssl/keystore.jks | ||
|
|
||
| - name: Create the test jar with certificates (Linux) | ||
| if: matrix.os == 'ubuntu-latest' | ||
| working-directory: certs | ||
| run: | | ||
| zip -r -j certs.jar $GITHUB_WORKSPACE/test/integration/backward_compatible/parallel/ssl/*.pem | ||
| cp certs.jar ../hazelcast-enterprise-${{ matrix.hz_version }}-tests.jar | ||
|
|
||
| - name: Create the test jar with certificates (Windows) | ||
| if: matrix.os == 'windows-latest' | ||
| working-directory: certs | ||
| run: | | ||
| $compress = @{ | ||
| Path = "../test/integration/backward_compatible/parallel/ssl/*.pem" | ||
| CompressionLevel = "Fastest" | ||
| DestinationPath = "certs.jar" | ||
| } | ||
| Compress-Archive -Update @compress | ||
| cp certs.jar ../hazelcast-enterprise-${{ matrix.hz_version }}-tests.jar | ||
|
|
||
| - name: Download RCD (Linux) | ||
| if: matrix.os == 'ubuntu-latest' | ||
| shell: bash | ||
| run: | | ||
| wget -q https://client-rcd-download.s3.us-east-2.amazonaws.com/rcd-ubuntu-latest | ||
|
|
||
| - name: Download RCD (Windows) | ||
| if: matrix.os == 'windows-latest' | ||
| run: | | ||
| $ProgressPreference = 'SilentlyContinue' | ||
| Invoke-WebRequest https://client-rcd-download.s3.us-east-2.amazonaws.com/rcd-windows-latest.exe -OutFile rcd-windows-latest.exe | ||
|
|
||
| - name: Install dependencies and compile client | ||
| run: | | ||
| npm install | ||
| npm run compile | ||
|
|
||
| - name: Run all tests | ||
| - name: Run all tests (Linux) | ||
| if: matrix.os == 'ubuntu-latest' | ||
| env: | ||
| HZ_VERSION: ${{ matrix.hz_version }} | ||
| run: | | ||
| chmod +x rcd-ubuntu-latest | ||
| ./rcd-ubuntu-latest -version $HZ_VERSION -no-simple-server & | ||
| # wait for a bit for RCD to download artifacts | ||
| sleep 10 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this a reliable check? some downloads last longer.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not the perfect solution but it's what were already using here - https://github.com/hazelcast/client-compatibility-suites/blob/9638ad773c89d8059a20d165d0c7101d9a95ac62/.github/workflows/python_client_compatibility.yaml#L126-L134 |
||
| npm run coverage | ||
|
|
||
| - name: Run all tests (Windows) | ||
| if: matrix.os == 'windows-latest' | ||
| env: | ||
| HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} | ||
| HZ_VERSION: ${{ matrix.hz_version }} | ||
| run: | | ||
| Start-Process -FilePath .\rcd-windows-latest -ArgumentList '-version', $Env:HZ_VERSION, '-no-simple-server' -RedirectStandardOutput rcd-stdout.log -RedirectStandardError rcd-stderr.log | ||
| # wait for a bit for RCD to download artifacts | ||
| sleep 10 | ||
| echo "RCD Log:" | ||
| cat rcd-stdout.log | ||
| cat rcd-stderr.log | ||
| npm run coverage | ||
|
|
||
| - name: Publish results to Codecov for PR coming from hazelcast organization | ||
|
|
@@ -122,12 +184,3 @@ jobs: | |
| files: coverage/lcov.info | ||
| override_pr: ${{ github.event.inputs.pr_number }} | ||
| fail_ci_if_error: true | ||
|
|
||
| - name: Upload remote controller logs if test run fails | ||
| uses: actions/upload-artifact@v4 | ||
| if: failure() | ||
| with: | ||
| name: rc-logs-${{ matrix.os }} | ||
| path: | | ||
| rc_stderr.log | ||
| rc_stdout.log | ||
This file was deleted.
This file was deleted.
This file was deleted.
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this file be included? I thought it's resolved from the certs JAR?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's for CI. People cloning the repo should still be able to run the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[]redundant.Also this upgrades the version from
5.4->5.6which is good but probably not required for this change.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remove the
[]I get a lint error. Thematrixschema seems to require it.We'll need 5.6.0 for the release of the client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - I think that's because it's a matrix.
My preference is that:
Is more readable in this case, but that's just a nit.
It would be nice if that was in the PR body or a seperate PR just in case someones tries to figure out why the behaviour changed in this PR and it appears to be just RCD.