-
Notifications
You must be signed in to change notification settings - Fork 7
235 lines (206 loc) · 7.95 KB
/
default.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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
---
name: Default Pipeline
on:
pull_request:
push:
branches:
- "main"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
init:
uses: ./.github/workflows/00-init.yml
scan-secrets:
if: github.event.pull_request == null || github.event.pull_request.head.repo.owner.login == 'db-ui'
uses: ./.github/workflows/00-scan-secrets.yml
get-playwright-version:
uses: ./.github/workflows/01-get-playwright-version.yml
needs: [init]
lint:
uses: ./.github/workflows/01-lint.yml
needs: [init]
build-packages:
uses: ./.github/workflows/01-build-packages.yml
needs: [init]
init-playwright:
uses: ./.github/workflows/01-init-playwright.yml
needs: [get-playwright-version]
with:
version: ${{ needs.get-playwright-version.outputs.version }}
build-outputs:
uses: ./.github/workflows/01-build-outputs.yml
needs: [build-packages]
test-components:
uses: ./.github/workflows/02-e2e.yml
needs: [build-packages, get-playwright-version]
with:
version: ${{ needs.get-playwright-version.outputs.version }}
test-foundations:
uses: ./.github/workflows/02-e2e-foundations.yml
needs: [build-packages, get-playwright-version]
with:
version: ${{ needs.get-playwright-version.outputs.version }}
build-showcase-angular:
uses: ./.github/workflows/01-build-showcases.yml
needs: [build-packages]
with:
showcase: angular-showcase
build-showcase-angular-ssr:
uses: ./.github/workflows/01-build-showcases.yml
needs: [build-packages]
with:
showcase: angular-ssr-showcase
build-showcase-react:
uses: ./.github/workflows/01-build-showcases.yml
needs: [build-packages]
with:
showcase: react-showcase
build-showcase-next:
uses: ./.github/workflows/01-build-showcases.yml
needs: [build-packages]
with:
showcase: next-showcase
build-showcase-vue:
uses: ./.github/workflows/01-build-showcases.yml
needs: [build-packages]
with:
showcase: vue-showcase
build-showcase-nuxt:
uses: ./.github/workflows/01-build-showcases.yml
needs: [build-packages]
with:
showcase: nuxt-showcase
build-showcase-patternhub:
uses: ./.github/workflows/01-build-patternhub.yml
needs: [build-packages]
test-showcase-angular:
uses: ./.github/workflows/02-e2e-showcases.yml
needs: [build-showcase-angular, get-playwright-version]
with:
version: ${{ needs.get-playwright-version.outputs.version }}
showcase: angular-showcase
test-showcase-react:
uses: ./.github/workflows/02-e2e-showcases.yml
needs: [build-showcase-react, get-playwright-version]
with:
version: ${{ needs.get-playwright-version.outputs.version }}
showcase: react-showcase
test-showcase-vue:
uses: ./.github/workflows/02-e2e-showcases.yml
needs: [build-showcase-vue, get-playwright-version]
with:
version: ${{ needs.get-playwright-version.outputs.version }}
showcase: vue-showcase
test-showcase-patternhub:
uses: ./.github/workflows/02-e2e-showcases.yml
needs: [build-showcase-patternhub, get-playwright-version]
with:
version: ${{ needs.get-playwright-version.outputs.version }}
showcase: patternhub
regenerate-snapshots-components:
if: always() && needs.test-components.result == 'failure'
uses: ./.github/workflows/02-e2e-regenerate.yml
with:
version: ${{ needs.get-playwright-version.outputs.version }}
type: components
needs: [test-components, get-playwright-version]
regenerate-snapshots-foundations:
if: always() && needs.test-foundations.result == 'failure'
uses: ./.github/workflows/02-e2e-regenerate.yml
with:
version: ${{ needs.get-playwright-version.outputs.version }}
type: foundations
needs: [test-foundations, get-playwright-version]
regenerate-snapshots-patternhub:
if: always() && needs.test-showcase-patternhub.result == 'failure'
uses: ./.github/workflows/02-e2e-regenerate.yml
with:
version: ${{ needs.get-playwright-version.outputs.version }}
type: patternhub
needs: [test-showcase-patternhub, get-playwright-version]
test-screen-reader:
uses: ./.github/workflows/02-e2e-screen-reader.yml
needs: [build-showcase-react, init-playwright, get-playwright-version]
with:
version: ${{ needs.get-playwright-version.outputs.version }}
regenerate-snapshots:
if: always() && (needs.test-showcase-angular.result == 'failure' || needs.test-showcase-react.result == 'failure' || needs.test-showcase-vue.result == 'failure')
uses: ./.github/workflows/02-e2e-regenerate.yml
with:
version: ${{ needs.get-playwright-version.outputs.version }}
type: showcases
needs:
[
test-showcase-angular,
test-showcase-react,
test-showcase-vue,
get-playwright-version
]
checks-done:
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: 🎉 Checks done
run: |
resultBuildShowcaseAngular="${{ needs.build-showcase-angular.result }}"
resultBuildShowcaseAngularSSR="${{ needs.build-showcase-angular-ssr.result }}"
resultBuildShowcaseReact="${{ needs.build-showcase-react.result }}"
resultBuildShowcaseNext="${{ needs.build-showcase-next.result }}"
resultBuildShowcaseVue="${{ needs.build-showcase-vue.result }}"
resultBuildShowcaseNuxt="${{ needs.build-showcase-nuxt.result }}"
resultBuildShowcasePatternhub="${{ needs.build-showcase-patternhub.result }}"
resultBuildOutputs="${{ needs.build-outputs.result }}"
resultTestPackages="${{ needs.test-components.result }}"
resultTestFoundations="${{ needs.test-foundations.result }}"
resultTestShowcaseAngular="${{ needs.test-showcase-angular.result }}"
resultTestShowcaseReact="${{ needs.test-showcase-react.result }}"
resultTestShowcaseVue="${{ needs.test-showcase-vue.result }}"
resultTestShowcasePatternhub="${{ needs.test-showcase-patternhub.result }}"
resultTestScreenReaders="${{ needs.test-screen-reader.result }}"
if [[ $resultTestFoundations == "success" ]] && \
[[ $resultTestScreenReaders == "success" ]] && \
[[ $resultTestShowcaseAngular == "success" ]] && \
[[ $resultTestShowcaseReact == "success" ]] && \
[[ $resultTestShowcaseVue == "success" ]] && \
[[ $resultTestShowcasePatternhub == "success" ]] && \
[[ $resultTestPackages == "success" ]] && \
[[ $resultBuildOutputs == "success" ]] && \
[[ $resultBuildShowcaseAngular == "success" ]] && \
[[ $resultBuildShowcaseAngularSSR == "success" ]] && \
[[ $resultBuildShowcaseReact == "success" ]] && \
[[ $resultBuildShowcaseNext == "success" ]] && \
[[ $resultBuildShowcaseVue == "success" ]] && \
[[ $resultBuildShowcaseNuxt == "success" ]] && \
[[ $resultBuildShowcasePatternhub == "success" ]]; then
echo "🎉 All tests were successful."
exit 0
else
echo "Some tests were failing."
exit 1
fi
needs:
[
build-showcase-angular,
build-showcase-angular-ssr,
build-showcase-react,
build-showcase-next,
build-showcase-vue,
build-showcase-nuxt,
build-showcase-patternhub,
build-outputs,
test-components,
test-showcase-angular,
test-showcase-react,
test-showcase-vue,
test-showcase-patternhub,
test-foundations,
test-screen-reader
]
deploy:
uses: ./.github/workflows/03-deploy-gh-pages.yml
if: ${{ github.actor != 'dependabot[bot]' && (github.event.pull_request == null || github.event.pull_request.head.repo.owner.login == 'db-ui') }}
needs: [checks-done]
with:
release: false
preRelease: false