-
Notifications
You must be signed in to change notification settings - Fork 13
179 lines (164 loc) · 6.63 KB
/
hierarchy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
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: [self-hosted]
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 }}
isDoc: ${{ steps.diff.outputs.isDoc }}
isReleaseNotesEligible: ${{ steps.diff.outputs.isReleaseNotesEligible }}
isWallet: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'iota-wallet')) }}
isExplorer: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'iota-explorer')) }}
isTypescriptSDK: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/iota-sdk')) }}
isAppsBackend: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'apps-backend')) }}
isAppsUiKit: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/apps-ui-kit')) }}
isWalletDashboard: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'wallet-dashboard')) }}
isGraphQlTransport: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/graphql-transport')) }}
isLedgerjs: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/ledgerjs-hw-app-iota')) }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
- name: Detect Changes (turbo)
uses: "./.github/actions/turbo-diffs"
id: turbo
- 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 # pin@v4
- 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 # pin@v4
- 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
release-notes-description-check:
name: release-notes-check
concurrency:
group: release-notes-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
needs: diff
if: (!cancelled() && needs.diff.outputs.isReleaseNotesEligible == 'true')
runs-on: [self-hosted]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
- name: Check Pull Request Description
shell: bash
run: |
export PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
export DESCRIPTION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/iotaledger/iota/pulls/${PR_NUMBER}" \
| jq --raw-output .body)
if [[ "${DESCRIPTION}" == *"[x]"* ]]; then
if [[ "${DESCRIPTION}" =~ Release[[:space:]]notes[[:space:]]+.* ]]; then
exit 0
else
echo "At least one '[x]' was checked under 'Type of Change (Check all that apply)', you need to add a blob under the 'Release Notes' section."
exit 1
fi
fi
turborepo:
needs:
- dprint-format
- typos
uses: ./.github/workflows/_turborepo.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' }}
e2e:
if: (!cancelled() && !failure() && (!github.event.pull_request.draft || github.ref_name == 'develop'))
needs:
- diff
- dprint-format
- license-check
- typos
uses: ./.github/workflows/_e2e.yml
with:
isRust: ${{ needs.diff.outputs.isRust == 'true' }}
isWallet: ${{ needs.diff.outputs.isWallet == 'true' }}
isExplorer: ${{ needs.diff.outputs.isExplorer == 'true' }}
isTypescriptSDK: ${{ needs.diff.outputs.isTypescriptSDK == 'true' }}
isGraphQlTransport: ${{ needs.diff.outputs.isGraphQlTransport == 'true' }}
isDevelop: ${{ github.ref_name == 'develop' }}
vercel-deploy:
if: (!cancelled() && !failure())
needs:
- diff
- dprint-format
- license-check
- typos
uses: ./.github/workflows/_vercel_deploy.yml
secrets: inherit
with:
shouldDeployPreview: ${{github.event_name == 'pull_request' && github.event.pull_request.draft == false}}
isExplorer: ${{ needs.diff.outputs.isExplorer == 'true' }}
isTypescriptSDK: ${{ needs.diff.outputs.isTypescriptSDK == 'true' }}
isAppsBackend: ${{ needs.diff.outputs.isAppsBackend == 'true' }}
isAppsUiKit: ${{ needs.diff.outputs.isAppsUiKit == 'true' }}
isWalletDashboard: ${{ needs.diff.outputs.isWalletDashboard == 'true' }}
isDevelop: ${{ github.ref_name == 'develop' }}
githubRef: ${{ github.event.pull_request.number || github.ref }}
ledgernano:
if: (!cancelled() && !failure()) && needs.diff.outputs.isLedgerjs == 'true' && github.event.pull_request.draft == false
needs:
- diff
- dprint-format
- license-check
- typos
uses: ./.github/workflows/_ledgernano.yml
secrets: inherit