feat: implement changing node account ids #208
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Flow: Rust CI" | |
| on: | |
| pull_request: | |
| push: | |
| branches: ['main'] | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: read | |
| env: | |
| NODE_VERSION: "20.18.3" | |
| jobs: | |
| format: | |
| runs-on: hiero-client-sdk-linux-medium | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout Code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| submodules: 'recursive' | |
| - name: Add `rustfmt` to toolchain | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| . $HOME/.cargo/env | |
| rustup +nightly component add rustfmt | |
| - name: Format | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| . $HOME/.cargo/env | |
| cargo +nightly fmt --check | |
| check: | |
| runs-on: hiero-client-sdk-linux-medium | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout Code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| submodules: 'recursive' | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 # v1 | |
| with: | |
| toolchain: 1.88.0 | |
| - name: Setup GCC and OpenSSL | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev libssl-dev pkg-config openssl | |
| - name: Install Protoc | |
| uses: step-security/setup-protoc@f6eb248a6510dbb851209febc1bd7981604a52e3 # v3.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| . $HOME/.cargo/env | |
| cargo check --examples --workspace | |
| test: | |
| needs: ['check'] | |
| runs-on: hiero-client-sdk-linux-medium | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout Code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| submodules: 'recursive' | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 # v1 | |
| with: | |
| toolchain: 1.88.0 | |
| - name: Setup GCC and OpenSSL | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev libssl-dev pkg-config openssl | |
| - name: Install Protoc | |
| uses: step-security/setup-protoc@f6eb248a6510dbb851209febc1bd7981604a52e3 # v3.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Prepare Hiero Solo | |
| id: solo | |
| uses: hiero-ledger/hiero-solo-action@6a1a77601cf3e69661fb6880530a4edf656b40d5 # v0.14.0 | |
| with: | |
| installMirrorNode: true | |
| - name: Create env file | |
| run: | | |
| touch .env | |
| echo TEST_OPERATOR_KEY="${{ steps.solo.outputs.privateKey }}" >> .env | |
| echo TEST_OPERATOR_ID="${{ steps.solo.outputs.accountId }}" >> .env | |
| echo TEST_NETWORK_NAME="localhost" >> .env | |
| echo TEST_RUN_NONFREE="1" >> .env | |
| cat .env | |
| - name: Test | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| . $HOME/.cargo/env | |
| cargo test --workspace -- --skip node::update | |
| dab-tests: | |
| needs: ['check'] | |
| runs-on: hiero-client-sdk-linux-medium | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout Code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| submodules: 'recursive' | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 # v1 | |
| with: | |
| toolchain: 1.88.0 | |
| - name: Setup GCC and OpenSSL | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev libssl-dev pkg-config openssl | |
| - name: Install Protoc | |
| uses: step-security/setup-protoc@f6eb248a6510dbb851209febc1bd7981604a52e3 # v3.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Prepare Hiero Solo for DAB Tests | |
| id: solo-dab | |
| uses: hiero-ledger/hiero-solo-action@2576140d0c1bb084c9be2ba59e82a4604c388e06 # branch: 75-add-support-for-multiple-consensus-nodes | |
| with: | |
| hieroVersion: v0.68.0-rc.1 | |
| installMirrorNode: true | |
| dualMode: true | |
| - name: Create env file for DAB Tests | |
| run: | | |
| touch .env | |
| echo TEST_OPERATOR_KEY="${{ steps.solo-dab.outputs.privateKey }}" >> .env | |
| echo TEST_OPERATOR_ID="${{ steps.solo-dab.outputs.accountId }}" >> .env | |
| echo TEST_NETWORK_NAME="localhost" >> .env | |
| echo TEST_RUN_NONFREE="1" >> .env | |
| cat .env | |
| - name: Run DAB Tests | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| . $HOME/.cargo/env | |
| cargo test --test e2e node::update::updates_addressbook_and_retries_after_node_account_id_change -- --nocapture --test-threads=1 |