chore: Remaining renaming to Hiero #3546
This file contains 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
# SPDX-License-Identifier: Apache-2.0 | |
name: PR Checks | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- release/* | |
pull_request: | |
branches: | |
- main | |
- develop | |
- release/* | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: read | |
packages: write | |
env: | |
LC_ALL: C.UTF-8 | |
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }} | |
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }} | |
jobs: | |
build: | |
name: Build | |
runs-on: client-sdk-linux-medium | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Java | |
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 | |
with: | |
distribution: temurin | |
java-version: '17.0.13' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2 | |
with: | |
cache-read-only: false | |
- name: Build SDK & Javadoc | |
run: ./gradlew assemble :sdk:javadoc --scan | |
test: | |
name: Unit and Integration Tests | |
runs-on: client-sdk-linux-medium | |
needs: | |
- build | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Setup NodeJS | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: 18 | |
- name: Setup Java | |
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 | |
with: | |
distribution: temurin | |
java-version: '17.0.13' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2 | |
- name: Install Local Node | |
run: npm install @hashgraph/hedera-local | |
- name: Build SDK | |
run: ./gradlew assemble --scan | |
- name: Code Quality Checks | |
run: ./gradlew qualityCheck :examples:qualityCheck --continue --scan | |
- name: Start Local Node | |
run: npx @hashgraph/hedera-local start -d --network local --network-tag=0.57.0 | |
- name: Run Unit and Integration Tests | |
env: | |
OPERATOR_KEY: '0xa608e2130a0a3cb34f86e757303c862bee353d9ab77ba4387ec084f881d420d4' | |
OPERATOR_ID: '0.0.1022' | |
HEDERA_NETWORK: 'localhost' | |
run: | | |
./gradlew -POPERATOR_ID=$OPERATOR_ID -POPERATOR_KEY=$OPERATOR_KEY -PHEDERA_NETWORK=$HEDERA_NETWORK :aggregation:testCodeCoverageReport --scan | |
- name: Upload coverage to Codecov | |
if: ${{ github.event_name == 'push' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') }} | |
uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a # v5.0.2 | |
with: | |
files: gradle/aggregation/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml | |
- name: Stop the local node | |
run: npx @hashgraph/hedera-local stop | |
run-examples: | |
name: Run Examples | |
runs-on: client-sdk-linux-medium | |
needs: | |
- build | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup NodeJS | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: 18 | |
- name: Setup Java | |
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 | |
with: | |
distribution: temurin | |
java-version: '17.0.13' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2 | |
- name: Install Local Node | |
run: npm install @hashgraph/hedera-local | |
- name: Build SDK | |
run: ./gradlew assemble --scan | |
- name: Build Android Example | |
run: ./gradlew -p example-android assemble --scan | |
- name: Start the local node | |
run: npx @hashgraph/hedera-local start -d --network local --network-tag=0.57.0 | |
- name: Prepare .env for Examples | |
run: | | |
echo "OPERATOR_KEY=0xa608e2130a0a3cb34f86e757303c862bee353d9ab77ba4387ec084f881d420d4" > examples/.env | |
echo "OPERATOR_ID=0.0.1022" >> examples/.env | |
echo "HEDERA_NETWORK=localhost" >> examples/.env | |
- name: Run Examples | |
run: ./gradlew :examples:runAllExamples --scan | |
- name: Stop the local node | |
run: npx @hashgraph/hedera-local stop | |
test-tck: | |
name: TCK Tests | |
runs-on: client-sdk-linux-medium | |
needs: | |
- build | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Setup NodeJS | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: 18 | |
- name: Setup Java | |
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 | |
with: | |
distribution: temurin | |
java-version: '17.0.13' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2 | |
- name: Install Local Node | |
run: npm install @hashgraph/hedera-local | |
- name: Build TCK | |
run: ./gradlew assemble --scan | |
- name: Start Local Node | |
run: npx @hashgraph/hedera-local start -d --network local | |
- name: Run TCK Unit Tests | |
run: ./gradlew :tck:test --scan | |
- name: Stop the local node | |
run: npx @hashgraph/hedera-local stop |