Skip to content

Commit 3d01db3

Browse files
andrewb1269hgrbarker-devtinker-michaelj
authored
chore: (0.65) Cherry-Pick add HAPI Testing (Misc Records) to PR checks and MATS (20394) (#20778)
Signed-off-by: Roger Barker <[email protected]> Signed-off-by: Michael Tinker <[email protected]> Co-authored-by: Roger Barker <[email protected]> Co-authored-by: Michael Tinker <[email protected]>
1 parent 9393d92 commit 3d01db3

File tree

4 files changed

+67
-1
lines changed

4 files changed

+67
-1
lines changed

.github/workflows/node-flow-build-application.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ jobs:
122122
java-distribution: ${{ github.event.inputs.java-distribution || 'temurin' }}
123123
enable-unit-tests: ${{ github.event_name == 'push' || github.event.inputs.enable-unit-tests == 'true' }}
124124
enable-hapi-tests-misc: ${{ github.event_name == 'push' || github.event.inputs.enable-hapi-tests == 'true' }}
125+
enable-hapi-tests-misc-records: ${{ github.event_name == 'push' || github.event.inputs.enable-hapi-tests == 'true' }}
125126
enable-hapi-tests-crypto: ${{ github.event_name == 'push' || github.event.inputs.enable-hapi-tests == 'true' }}
126127
enable-hapi-tests-iss: ${{ github.event_name == 'push' || github.event.inputs.enable-hapi-tests == 'true' }}
127128
enable-hapi-tests-token: ${{ github.event_name == 'push' || github.event.inputs.enable-hapi-tests == 'true' }}

.github/workflows/node-flow-pull-request-checks.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ defaults:
1212
run:
1313
shell: bash
1414

15+
permissions:
16+
id-token: write
17+
actions: read
18+
pull-requests: write
19+
statuses: write
20+
checks: write
21+
contents: read
22+
1523
concurrency:
1624
group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1725
cancel-in-progress: true
@@ -86,6 +94,22 @@ jobs:
8694
gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
8795
gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
8896

97+
hapi-tests-misc-records:
98+
name: HAPI Tests (Misc Records)
99+
uses: ./.github/workflows/node-zxc-compile-application-code.yaml
100+
needs:
101+
- dependency-check
102+
- spotless
103+
with:
104+
custom-job-label: Standard
105+
enable-unit-tests: false
106+
enable-hapi-tests-misc-records: true
107+
enable-network-log-capture: true
108+
secrets:
109+
access-token: ${{ secrets.GITHUB_TOKEN }}
110+
gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
111+
gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
112+
89113
hapi-tests-crypto:
90114
name: HAPI Tests (Crypto)
91115
uses: ./.github/workflows/node-zxc-compile-application-code.yaml

.github/workflows/node-zxc-compile-application-code.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ on:
2828
type: boolean
2929
required: false
3030
default: false
31+
enable-hapi-tests-misc-records:
32+
description: "HAPI Testng (misc records) Enabled"
33+
type: boolean
34+
required: false
35+
default: false
3136
enable-hapi-tests-crypto:
3237
description: "HAPI Testing (crypto) Enabled"
3338
type: boolean
@@ -323,6 +328,42 @@ jobs:
323328
hedera-node/test-clients/output/**
324329
retention-days: 7
325330

331+
- name: HAPI Testing (Misc Records)
332+
id: gradle-hapi-misc-records
333+
if: ${{ inputs.enable-hapi-tests-misc-records && steps.gradle-build.conclusion == 'success' && !cancelled() }}
334+
env:
335+
LC_ALL: en.UTF-8
336+
LANG: en_US.UTF-8
337+
run: ${GRADLE_EXEC} hapiTestMiscRecords
338+
339+
- name: Publish HAPI Test (Misc Records) Report
340+
uses: step-security/publish-unit-test-result-action@201bbe166c323b2f9dab6dfbf9d6b6c001bd0dce # v2.20.1
341+
if: ${{ inputs.enable-hapi-tests-misc-records && steps.gradle-build.conclusion == 'success' && !cancelled() }}
342+
with:
343+
check_name: "Node: HAPI Test (Misc Records) Results"
344+
json_thousands_separator: ","
345+
junit_files: "**/test-clients/build/test-results/testSubprocess/TEST-*.xml"
346+
comment_mode: errors # only comment if we could not find or parse the JUnit XML files
347+
348+
- name: Upload HAPI Test (Misc Records) Report Artifacts
349+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
350+
if: ${{ inputs.enable-hapi-tests-misc-records && steps.gradle-build.conclusion == 'success' && !cancelled() }}
351+
with:
352+
name: HAPI Test (Misc Records) Report
353+
path: "**/test-clients/build/test-results/**/TEST-*.xml"
354+
retention-days: 7
355+
356+
- name: Upload HAPI Test (Misc Records) Network Logs
357+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
358+
if: ${{ inputs.enable-hapi-tests-misc-records && inputs.enable-network-log-capture && steps.gradle-hapi-misc-records.conclusion == 'failure' && !cancelled() }}
359+
with:
360+
name: HAPI Test (Misc Records) Network Logs
361+
path: |
362+
hedera-node/test-clients/build/hapi-test/**/output/**
363+
hedera-node/test-clients/build/hapi-test/*.log
364+
hedera-node/test-clients/output/**
365+
retention-days: 7
366+
326367
- name: HAPI Testing (Crypto)
327368
id: gradle-hapi-crypto
328369
if: ${{ inputs.enable-hapi-tests-crypto && steps.gradle-build.conclusion == 'success' && !cancelled() }}

hedera-node/test-clients/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ val prCheckPropOverrides =
104104
"tss.hintsEnabled=true,tss.forceHandoffs=true,tss.initialCrsParties=16,blockStream.blockPeriod=1s",
105105
"hapiTestMisc" to "nodes.nodeRewardsEnabled=false",
106106
"hapiTestTimeConsuming" to "nodes.nodeRewardsEnabled=false",
107-
"hapiTestMiscRecords" to "blockStream.streamMode=RECORDS",
107+
"hapiTestMiscRecords" to "blockStream.streamMode=RECORDS,nodes.nodeRewardsEnabled=false",
108108
)
109109
val prCheckPrepareUpgradeOffsets = mapOf("hapiTestAdhoc" to "PT300S")
110110
val prCheckNumHistoryProofsToObserve = mapOf("hapiTestAdhoc" to "0", "hapiTestSmartContract" to "0")

0 commit comments

Comments
 (0)