Skip to content

Fix mirror-report docs (#12571) #18356

Fix mirror-report docs (#12571)

Fix mirror-report docs (#12571) #18356

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
name: "Gradle"
on:
pull_request:
branches:
- "main"
- "release/**"
push:
branches:
- "main"
- "release/**"
tags:
- "v*"
defaults:
run:
shell: bash
permissions:
contents: read
env:
LC_ALL: C.UTF-8
CGO_ENABLED: 1
jobs:
build:
name: Build
runs-on: hiero-mirror-node-linux-large
strategy:
fail-fast: false
matrix:
project:
- common
- graphql
- grpc
- importer
- monitor
- rest
- rest-java
- "rest:check-state-proof"
- rosetta
- test
- web3
schema:
- v1
- v2
exclude:
- project: common
schema: v2
- project: monitor
schema: v2
- project: rest:check-state-proof
schema: v2
- project: rosetta
schema: v2
- project: test
schema: v2
timeout-minutes: 40 # increase it from 20 minutes since some jobs often run longer on self-hosted runners
steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install JDK
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v4
- name: Execute Gradle
env:
MIRROR_NODE_SCHEMA: ${{ matrix.schema}}
SPRING_PROFILES_ACTIVE: ${{ matrix.schema}}
run: ./gradlew :${{matrix.project}}:build --scan ${{ secrets.GRADLE_ARGS }}
- name: Upload coverage report
continue-on-error: true
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
if: ${{ matrix.schema == 'v1' && matrix.project != 'test' && always() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) }}
run: ./gradlew :${{ matrix.project }}:uploadCoverage
coverage:
if: github.event_name == 'push' || (github.event.pull_request.head.repo.full_name == github.repository)
name: Upload coverage
needs: build
runs-on: hiero-mirror-node-linux-large
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
egress-policy: audit
- name: Finalize coverage report
continue-on-error: true
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) final