Skip to content

chore(CI): Move split cluster check into hierarchy #9555

chore(CI): Move split cluster check into hierarchy

chore(CI): Move split cluster check into hierarchy #9555

Workflow file for this run

name: Hierarchy
on:
push:
branches:
- "develop"
- "devnet"
- "testnet"
- "mainnet"
- "releases/iota-*-release"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
diff:
runs-on: [ubuntu-latest]
concurrency:
group: diff-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
outputs:
isRust: ${{ steps.diff.outputs.isRust }}
isMove: ${{ steps.diff.outputs.isMove }}
isRosetta: ${{ steps.diff.outputs.isRosetta }}
isDoc: ${{ steps.diff.outputs.isDoc }}
isReleaseNotesEligible: ${{ steps.diff.outputs.isReleaseNotesEligible }}
isExternalCrates: ${{ steps.diff.outputs.isExternalCrates }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Detect Changes (diff)
uses: "./.github/actions/diffs"
id: diff
dprint-format:
runs-on: [self-hosted]
concurrency:
group: dprint-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Check dprint formatting
run: dprint check
typos:
uses: ./.github/workflows/_typos.yml
license-check:
name: license-check
concurrency:
group: license-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
needs: diff
if: (!cancelled() && needs.diff.outputs.isRust == 'true')
runs-on: [self-hosted]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Run license check
run: cargo ci-license
docusaurus:
needs: diff
if: (!cancelled() && needs.diff.outputs.isDoc == 'true' && !github.event.pull_request.draft)
uses: ./.github/workflows/_docusaurus.yml
docs-lint:
needs: diff
if: (!cancelled() && needs.diff.outputs.isDoc == 'true')
uses: ./.github/workflows/_docs_lint.yml
move-tests:
needs:
- diff
- dprint-format
- license-check
- typos
if: |
!cancelled() && !failure() &&
needs.diff.outputs.isRust == 'false' &&
needs.diff.outputs.isMove == 'true' &&
github.event.pull_request.draft == false
uses: ./.github/workflows/_move_tests.yml
rust:
needs:
- diff
- dprint-format
- license-check
- typos
if: (!cancelled() && !failure())
uses: ./.github/workflows/_rust.yml
secrets: inherit
with:
isRust: ${{ needs.diff.outputs.isRust == 'true' }}
rosetta:
needs:
- diff
- dprint-format
- license-check
- typos
if: |
!cancelled() && !failure() &&
(needs.diff.outputs.isRosetta == 'true' || needs.diff.outputs.isRust == 'true')
uses: ./.github/workflows/_rosetta.yml
move-ide:
if: (!cancelled() && !failure()) && needs.diff.outputs.isExternalCrates == 'true' && github.event.pull_request.draft == false
needs:
- diff
- dprint-format
- license-check
- typos
uses: ./.github/workflows/_move_ide.yml
split-cluster:
if: (!cancelled() && !failure()) && needs.diff.outputs.isRust == 'true' && github.event.pull_request.draft == false
needs:
- diff
- rust
uses: ./.github/workflows/_split_cluster.yml