1- name : Rust CI
1+ name : " Flow: Rust CI"
22on :
33 pull_request :
44 push :
@@ -11,17 +11,20 @@ defaults:
1111permissions :
1212 contents : read
1313
14+ env :
15+ NODE_VERSION : " 20.18.3"
16+
1417jobs :
1518 format :
1619 runs-on : hiero-client-sdk-linux-medium
1720 steps :
1821 - name : Harden Runner
19- uses : step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
22+ uses : step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
2023 with :
2124 egress-policy : audit
2225
2326 - name : Checkout Code
24- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2528 with :
2629 submodules : ' recursive'
2730
@@ -42,39 +45,30 @@ jobs:
4245 runs-on : hiero-client-sdk-linux-medium
4346 steps :
4447 - name : Harden Runner
45- uses : step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
48+ uses : step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
4649 with :
4750 egress-policy : audit
4851
49- - name : Setup NodeJS
50- uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
51- with :
52- node-version : 18
53-
54- - name : Setup GCC and OpenSSL
55- run : |
56- sudo apt-get update
57- sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev libssl-dev pkg-config openssl
58-
5952 - name : Checkout Code
60- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
53+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6154 with :
6255 submodules : ' recursive'
6356
64- - name : Rust Cache
65- uses : step-security /rust-cache@3dc80ea64187c7f97c5b985b9dcd71fa45103573 # v2.7.8
57+ - name : Setup Rust
58+ uses : dtolnay /rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b # v1
6659 with :
67- workspaces : |
68- sdk/rust
60+ toolchain : 1.88.0
6961
70- - name : Install pkg-config
62+ - name : Setup GCC and OpenSSL
7163 run : |
7264 sudo apt-get update
73- sudo apt-get install -y pkg-config
65+ sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev libssl-dev pkg-config openssl
66+
7467 - name : Install Protoc
7568 uses : arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
7669 with :
7770 repo-token : ${{ secrets.GITHUB_TOKEN }}
71+
7872 - name : Check
7973 run : |
8074 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
@@ -86,44 +80,47 @@ jobs:
8680 runs-on : hiero-client-sdk-linux-medium
8781 steps :
8882 - name : Harden Runner
89- uses : step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
83+ uses : step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
9084 with :
9185 egress-policy : audit
9286
93- - name : Setup NodeJS
94- uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
87+ - name : Checkout Code
88+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
89+ with :
90+ submodules : ' recursive'
91+
92+ - name : Setup Rust
93+ uses : dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b # v1
9594 with :
96- node-version : 18
95+ toolchain : 1.88.0
9796
9897 - name : Setup GCC and OpenSSL
9998 run : |
10099 sudo apt-get update
101100 sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev libssl-dev pkg-config openssl
102101
103- - name : Checkout Code
104- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
105- with :
106- submodules : ' recursive'
107-
108- - name : Rust Cache
109- uses : step-security/rust-cache@3dc80ea64187c7f97c5b985b9dcd71fa45103573 # v2.7.8
110- with :
111- workspaces : |
112- .
113-
114102 - name : Install Protoc
115103 uses : arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
116104 with :
117105 repo-token : ${{ secrets.GITHUB_TOKEN }}
118106
119- - name : Start the local node
120- run : npx @hashgraph/hedera-local start -d --network local --network-tag=0.60.0-alpha.0
107+ - name : Setup NodeJS
108+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
109+ with :
110+ node-version : ${{ env.NODE_VERSION }}
111+
112+ - name : Prepare Hiero Solo
113+ id : solo
114+ uses : hiero-ledger/hiero-solo-action@10ec96a107b8d2f5cd26b3e7ab47e65407b5c462 # v0.11.0
115+ with :
116+ installMirrorNode : true
117+ hieroVersion : v0.65.0
121118
122- - name : " Create env file"
119+ - name : Create env file
123120 run : |
124121 touch .env
125- echo TEST_OPERATOR_KEY="302e020100300506032b657004220420a608e2130a0a3cb34f86e757303c862bee353d9ab77ba4387ec084f881d420d4 " >> .env
126- echo TEST_OPERATOR_ID="0.0.1022 " >> .env
122+ echo TEST_OPERATOR_KEY="${{ steps.solo.outputs.privateKey }} " >> .env
123+ echo TEST_OPERATOR_ID="${{ steps.solo.outputs.accountId }} " >> .env
127124 echo TEST_NETWORK_NAME="localhost" >> .env
128125 echo TEST_RUN_NONFREE="1" >> .env
129126 cat .env
@@ -132,7 +129,4 @@ jobs:
132129 run : |
133130 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
134131 . $HOME/.cargo/env
135- cargo test --workspace
136-
137- - name : Stop the local node
138- run : npx @hashgraph/hedera-local stop
132+ cargo test --workspace
0 commit comments