-
Notifications
You must be signed in to change notification settings - Fork 61
Update nighlies to work with RCD #1575
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
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 |
|---|---|---|
|
|
@@ -8,47 +8,120 @@ jobs: | |
| uses: ./.github/workflows/get-supported-node-versions.yml | ||
|
|
||
| run-tests: | ||
| runs-on: ${{ matrix.os }} | ||
| needs: node-versions | ||
| name: Run tests of master on ${{ matrix.os }} with Node ${{ matrix.nodejs_version }} | ||
| needs: | ||
| - node-versions | ||
| runs-on: ${{ matrix.os }} | ||
| permissions: | ||
| id-token: write | ||
| strategy: | ||
| matrix: | ||
| os: [ ubuntu-latest, windows-latest ] | ||
| nodejs_version: ${{ fromJSON(needs.node-versions.outputs.node-versions) }} | ||
| hz_version: [ "5.6.0" ] | ||
| fail-fast: false | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Read Java Config | ||
| shell: bash | ||
| run: cat .github/java-config.env >> $GITHUB_ENV | ||
|
|
||
| - name: Setup Java | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: ${{ env.JAVA_VERSION }} | ||
| distribution: ${{ env.JAVA_DISTRIBUTION }} | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.nodejs_version }} | ||
| - name: Checkout to test artifacts | ||
| node-version: ${{ needs.node-versions.outputs.default-version }} | ||
|
|
||
| - 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' | ||
|
JackPGreen marked this conversation as resolved.
|
||
|
|
||
| - 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 | ||
| 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: Validate User Code | ||
| run: npm run validate-user-code | ||
| - name: Run 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 | ||
| # make sure to run the coverage in the same step with RCD | ||
| npm run coverage | ||
|
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. Could we move
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. Having it in a separate step didn't work before.
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. Nit - maybe add a comment to that effect?
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. Added at: 0374397 |
||
|
|
||
| - name: Run all tests (Windows) | ||
| if: matrix.os == 'windows-latest' | ||
| env: | ||
| HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} | ||
| run: npm run test | ||
| 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 | ||
| # make sure to run the coverage in the same step with RCD | ||
| npm run coverage | ||
|
Comment on lines
+123
to
+127
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. We only capture the log output for Windows, not Linux.
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. I agree, we have to refactor the workflows. RCD logs are sent to atdout/stderr on Linux, but they are redirected to a file in Windows. |
||
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.
nit