-
Notifications
You must be signed in to change notification settings - Fork 36
218 lines (184 loc) · 6.9 KB
/
ic-ui-kit-develop.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
name: Develop
permissions: read-all
on:
push:
branches:
- develop
- v3.0.0/develop
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-updates:
name: "Check package updates"
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
core: ${{ steps.filter.outputs.core }}
canary: ${{ steps.filter.outputs.canary }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 #v3.0.2
id: filter
with:
filters: |
core:
- './packages/web-components/**'
- './packages/react/**'
canary:
- './packages/canary-web-components/**'
- './packages/canary-react/**'
ic-ui-kit-static-analysis-tests:
needs: [check-updates]
name: "Static analysis tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 #4.0.2
with:
node-version: 20
- name: Install dependencies
run: |
npm ci
npm run bootstrap -- -- --ci
- name: Build core components
if: ${{ needs.check-updates.outputs.canary == 'false' }}
run: npm run build
- name: Build all components
if: ${{ needs.check-updates.outputs.canary == 'true' }}
run: |
npm run build:all
- name: Lint commit messages
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")
echo "$COMMIT_MESSAGE" | npx commitlint
- name: Lint
run: npm run lint
- name: Lint grammar
run: npm run lint:spelling
- name: Prettier
run: npm run prettier
- name: Audit
run: npm run audit:bypass-expiry
- name: A11y core tests
if: ${{ needs.check-updates.outputs.core == 'true' }}
run: npm run test-a11y:ci
- name: A11y canary tests
if: ${{ needs.check-updates.outputs.canary == 'true' }}
run: npm run test-a11y:ci:canary
- name: Unit Component tests
run: npm run test:coverage-ci
ic-ui-kit-e2e-tests:
needs: [check-updates]
name: "E2E tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 #4.0.2
with:
node-version: 20
- name: Install dependencies
run: |
npm ci
npm run bootstrap -- -- --ci
- name: E2E core tests
if: ${{ needs.check-updates.outputs.core == 'true' }}
id: core_e2e_tests
run: npm run test-e2e
- name: Build core components
if: ${{ steps.core_e2e_tests.outcome == 'skipped' && needs.check-updates.outputs.canary == 'true' }}
run: npm run build
- name: E2E canary tests
if: ${{ needs.check-updates.outputs.canary == 'true' }}
run: npm run test-e2e:canary
ic-ui-kit-cypress-tests:
needs: [check-updates]
name: "Cypress tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 #4.0.2
with:
node-version: 20
- uses: browser-actions/setup-chrome@97349de5c98094d4fc9412f31c524d7697115ad8 #v1.5.0
- name: Install dependencies
run: |
google-chrome --version
npm ci
npm run bootstrap -- -- --ci
- name: Core Cypress tests
if: ${{ needs.check-updates.outputs.core == 'true' }}
id: core_cypress_tests
run: npm run test-cypress:ci
- name: Canary Cypress tests
if: ${{ needs.check-updates.outputs.canary == 'true' }}
id: canary_cypress_tests
run: npm run test-cypress:ci:canary
- name: Cypress performance tests
if: ${{ needs.check-updates.outputs.core == 'true' }}
id: core_cypress_performance_tests
run: npm run test-cypress-perf:ci
ic-ui-kit-deploy-core:
needs:
[
ic-ui-kit-static-analysis-tests,
ic-ui-kit-e2e-tests,
check-updates,
ic-ui-kit-cypress-tests,
]
name: "Deploy QA Storybook"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 #4.0.2
with:
node-version: 20
- name: Install dependencies
run: |
npm ci
npm run bootstrap -- -- --ci
- name: Build core components
if: ${{ needs.check-updates.outputs.canary == 'false' }}
run: |
npm run build
- name: Build all components
if: ${{ needs.check-updates.outputs.canary == 'true' }}
run: |
npm run build:all
- name: Build web-components and react storybook
if: ${{ needs.check-updates.outputs.core == 'true' }}
run: |
npm run build-storybook:web-components
npm run build-storybook:react
- name: Build canary web-components and canary react storybook
if: ${{ needs.check-updates.outputs.canary == 'true' }}
run: |
npm run build-storybook:canary-web-components
npm run build-storybook:canary-react
- name: Deploy web components storybook
if: ${{ needs.check-updates.outputs.core == 'true' }}
uses: JamesIves/github-pages-deploy-action@65b5dfd4f5bcd3a7403bbc2959c144256167464e #v4.5.0
with:
folder: ./packages/web-components/storybook-static
target-folder: ./branches/${{ github.ref_name }}/web-components
- name: Deploy react storybook
if: ${{ needs.check-updates.outputs.core == 'true' }}
uses: JamesIves/github-pages-deploy-action@65b5dfd4f5bcd3a7403bbc2959c144256167464e #v4.5.0
with:
folder: ./packages/react/storybook-static
target-folder: ./branches/${{ github.ref_name }}/react
- name: Deploy canary web components storybook
if: ${{ needs.check-updates.outputs.canary == 'true' }}
uses: JamesIves/github-pages-deploy-action@65b5dfd4f5bcd3a7403bbc2959c144256167464e #v4.5.0
with:
folder: ./packages/canary-web-components/storybook-static
target-folder: ./branches/canary/${{ github.ref_name }}/web-components
- name: Deploy canary react storybook
if: ${{ needs.check-updates.outputs.canary == 'true' }}
uses: JamesIves/github-pages-deploy-action@65b5dfd4f5bcd3a7403bbc2959c144256167464e #v4.5.0
with:
folder: ./packages/canary-react/storybook-static
target-folder: ./branches/canary/${{ github.ref_name }}/react