Skip to content

Commit 650efc8

Browse files
Integrate Hiero Solo into PR Checks workflow
1 parent 8767f16 commit 650efc8

File tree

1 file changed

+30
-31
lines changed

1 file changed

+30
-31
lines changed

.github/workflows/build.yml

+30-31
Original file line numberDiff line numberDiff line change
@@ -174,23 +174,23 @@ jobs:
174174
- name: Setup Gradle
175175
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
176176

177-
- name: Install Local Node
178-
run: npm install -g @hashgraph/hedera-local
177+
- name: Prepare Hiero Solo
178+
id: solo
179+
uses: hiero-ledger/hiero-solo-action@35efe2334bffb73298716402a5c688321ec29260 # v0.6
180+
with:
181+
installMirrorNode: true
179182

180183
- name: Build SDK
181184
run: ./gradlew assemble
182185

183186
- name: Code Quality Checks
184187
run: ./gradlew qualityCheck :examples:qualityCheck --continue --rerun-tasks
185188

186-
- name: Start Local Node
187-
run: npx @hashgraph/hedera-local start -d --network local --network-tag=0.60.0-alpha.0
188-
189189
- name: Run Unit and Integration Tests
190190
env:
191-
OPERATOR_KEY: "0xa608e2130a0a3cb34f86e757303c862bee353d9ab77ba4387ec084f881d420d4"
192-
OPERATOR_ID: "0.0.1022"
193-
HEDERA_NETWORK: "localhost"
191+
OPERATOR_ID: ${{ steps.solo.outputs.accountId }}
192+
OPERATOR_KEY: ${{ steps.solo.outputs.privateKey }}
193+
HEDERA_NETWORK: solo
194194
run: |
195195
./gradlew -POPERATOR_ID=$OPERATOR_ID -POPERATOR_KEY=$OPERATOR_KEY -PHEDERA_NETWORK=$HEDERA_NETWORK :aggregation:testCodeCoverageReport
196196
@@ -200,9 +200,6 @@ jobs:
200200
with:
201201
files: gradle/aggregation/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml
202202

203-
- name: Stop the local node
204-
run: npx @hashgraph/hedera-local stop
205-
206203
run-examples:
207204
name: Run Examples
208205
runs-on: hiero-client-sdk-linux-medium
@@ -234,30 +231,31 @@ jobs:
234231
- name: Setup Gradle
235232
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
236233

237-
- name: Install Local Node
238-
run: npm install -g @hashgraph/hedera-local
234+
- name: Prepare Hiero Solo
235+
id: solo
236+
uses: hiero-ledger/hiero-solo-action@35efe2334bffb73298716402a5c688321ec29260 # v0.6
237+
with:
238+
installMirrorNode: true
239239

240240
- name: Build SDK
241241
run: ./gradlew assemble
242242

243243
- name: Build Android Example
244244
run: ./gradlew -p example-android assemble
245245

246-
- name: Start the local node
247-
run: npx @hashgraph/hedera-local start -d --network local --network-tag=0.60.0-alpha.0
248-
249246
- name: Prepare .env for Examples
250247
run: |
251-
echo "OPERATOR_KEY=0xa608e2130a0a3cb34f86e757303c862bee353d9ab77ba4387ec084f881d420d4" > examples/.env
252-
echo "OPERATOR_ID=0.0.1022" >> examples/.env
253-
echo "HEDERA_NETWORK=localhost" >> examples/.env
248+
echo "OPERATOR_KEY=${{ steps.solo.outputs.privateKey }}" > examples/.env
249+
echo "OPERATOR_ID=${{ steps.solo.outputs.accountId }}" >> examples/.env
250+
echo "HEDERA_NETWORK=solo" >> examples/.env
254251
255252
- name: Run Examples
253+
env:
254+
OPERATOR_ID: ${{ steps.solo.outputs.accountId }}
255+
OPERATOR_KEY: ${{ steps.solo.outputs.privateKey }}
256+
HEDERA_NETWORK: solo
256257
run: ./gradlew :examples:runAllExamples
257258

258-
- name: Stop the local node
259-
run: npx @hashgraph/hedera-local stop
260-
261259
test-tck:
262260
name: TCK Tests
263261
runs-on: hiero-client-sdk-linux-medium
@@ -288,17 +286,18 @@ jobs:
288286
- name: Setup Gradle
289287
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
290288

291-
- name: Install Local Node
292-
run: npm install -g @hashgraph/hedera-local
289+
- name: Prepare Hiero Solo
290+
id: solo
291+
uses: hiero-ledger/hiero-solo-action@35efe2334bffb73298716402a5c688321ec29260 # v0.6
292+
with:
293+
installMirrorNode: true
293294

294295
- name: Build TCK
295296
run: ./gradlew assemble
296297

297-
- name: Start Local Node
298-
run: npx @hashgraph/hedera-local start -d --network local
299-
300298
- name: Run TCK Unit Tests
301-
run: ./gradlew :tck:test
302-
303-
- name: Stop the local node
304-
run: npx @hashgraph/hedera-local stop
299+
env:
300+
OPERATOR_ID: ${{ steps.solo.outputs.accountId }}
301+
OPERATOR_KEY: ${{ steps.solo.outputs.privateKey }}
302+
HEDERA_NETWORK: solo
303+
run: ./gradlew -POPERATOR_ID=$OPERATOR_ID -POPERATOR_KEY=$OPERATOR_KEY -PHEDERA_NETWORK=$HEDERA_NETWORK :tck:test

0 commit comments

Comments
 (0)