-
Notifications
You must be signed in to change notification settings - Fork 0
239 lines (222 loc) · 9.42 KB
/
main.yml
File metadata and controls
239 lines (222 loc) · 9.42 KB
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
236
237
238
239
name: Main Branch Delivery
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build and Upload Artifacts
runs-on: ubuntu-latest
env:
POLLI_TOKEN: ${{ secrets.POLLI_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLINATIONS_TOKEN }}
VITE_POLLI_TOKEN: ${{ secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN }}
POLLINATIONS_TOKEN: ${{ secrets.POLLINATIONS_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN }}
VITE_POLLINATIONS_TOKEN: ${{ secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Write version file
run: node tools/write-version.mjs
- name: Build
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist
report-build-status:
name: Report Build Status
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Report Build Status
run: node tools/report-build-status.mjs
env:
BUILD_RESULT: ${{ needs.build.result }}
tests-core:
name: Build Tests (core)
runs-on: ubuntu-latest
needs: build
env:
POLLI_TOKEN: ${{ secrets.POLLI_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLINATIONS_TOKEN }}
VITE_POLLI_TOKEN: ${{ secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN }}
POLLINATIONS_TOKEN: ${{ secrets.POLLINATIONS_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN }}
VITE_POLLINATIONS_TOKEN: ${{ secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN }}
steps:
- uses: actions/checkout@v4
with: { submodules: recursive }
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'npm' }
- run: npm install
- name: Build Tests (core suite)
run: node tools/run-tests.mjs --pattern "^(?!all-models-(live|deep)|tts-live|models-export).*\\.test\\.mjs$" --output reports/test-results-core.json
- name: Upload core test report
if: always()
uses: actions/upload-artifact@v4
with:
name: main-tests-core
path: reports/test-results-core.json
if-no-files-found: warn
tests-live:
name: Build Tests (live models)
runs-on: ubuntu-latest
needs: build
continue-on-error: true
env:
POLLI_TOKEN: ${{ secrets.POLLI_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLINATIONS_TOKEN }}
VITE_POLLI_TOKEN: ${{ secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN }}
POLLINATIONS_TOKEN: ${{ secrets.POLLINATIONS_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN }}
VITE_POLLINATIONS_TOKEN: ${{ secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN }}
steps:
- uses: actions/checkout@v4
with: { submodules: recursive }
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'npm' }
- run: npm install
- name: Build Tests (live sweep)
run: node tools/run-tests.mjs --pattern "all-models-live" --output reports/test-results-live.json
- name: Upload live test report
if: always()
uses: actions/upload-artifact@v4
with:
name: main-tests-live
path: reports/test-results-live.json
if-no-files-found: warn
tests-tts:
name: Build Tests (tts)
runs-on: ubuntu-latest
needs: build
continue-on-error: true
env:
POLLI_TOKEN: ${{ secrets.POLLI_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLINATIONS_TOKEN }}
VITE_POLLI_TOKEN: ${{ secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN }}
POLLINATIONS_TOKEN: ${{ secrets.POLLINATIONS_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN }}
VITE_POLLINATIONS_TOKEN: ${{ secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN }}
steps:
- uses: actions/checkout@v4
with: { submodules: recursive }
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'npm' }
- run: npm install
- name: Build Tests (tts live)
run: node tools/run-tests.mjs --pattern "tts-live" --output reports/test-results-tts.json
- name: Upload tts test report
if: always()
uses: actions/upload-artifact@v4
with:
name: main-tests-tts
path: reports/test-results-tts.json
if-no-files-found: warn
tests-models:
name: Build Tests (models export)
runs-on: ubuntu-latest
needs: build
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'npm' }
- run: npm install
- name: Build Tests (models export)
run: node tools/run-tests.mjs --pattern "models-export" --output reports/test-results-models.json
- name: Upload models export report
if: always()
uses: actions/upload-artifact@v4
with:
name: main-tests-models
path: reports/test-results-models.json
if-no-files-found: warn
tests-deep:
name: Build Tests (deep sweep)
runs-on: ubuntu-latest
needs: build
continue-on-error: true
env:
MODELS_DEEP_ENABLED: 1
POLLI_TOKEN: ${{ secrets.POLLI_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLINATIONS_TOKEN }}
VITE_POLLI_TOKEN: ${{ secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN }}
POLLINATIONS_TOKEN: ${{ secrets.POLLINATIONS_TOKEN || secrets.POLLI_TOKEN || secrets.VITE_POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN }}
VITE_POLLINATIONS_TOKEN: ${{ secrets.VITE_POLLINATIONS_TOKEN || secrets.POLLINATIONS_TOKEN || secrets.VITE_POLLI_TOKEN || secrets.POLLI_TOKEN }}
steps:
- uses: actions/checkout@v4
with: { submodules: recursive }
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'npm' }
- run: npm install
- name: Build Tests (deep sweep)
run: node tools/run-tests.mjs --pattern "all-models-deep" --output reports/test-results-deep.json
- name: Upload deep sweep report
if: always()
uses: actions/upload-artifact@v4
with:
name: main-tests-deep
path: reports/test-results-deep.json
if-no-files-found: warn
deploy:
name: Deploy to Pages
runs-on: ubuntu-latest
needs: build
if: ${{ needs.build.result == 'success' }}
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4
report-tests:
name: Report Tests Statuses
runs-on: ubuntu-latest
needs: [tests-core, tests-live, tests-tts, tests-models, tests-deep]
if: always()
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download core tests
uses: actions/download-artifact@v4
continue-on-error: true
with: { name: main-tests-core, path: reports }
- name: Download live tests
uses: actions/download-artifact@v4
continue-on-error: true
with: { name: main-tests-live, path: reports }
- name: Download tts tests
uses: actions/download-artifact@v4
continue-on-error: true
with: { name: main-tests-tts, path: reports }
- name: Download models export tests
uses: actions/download-artifact@v4
continue-on-error: true
with: { name: main-tests-models, path: reports }
- name: Download deep tests
uses: actions/download-artifact@v4
continue-on-error: true
with: { name: main-tests-deep, path: reports }
- name: Report core tests
run: node tools/report-tests.mjs --title "Core Tests" --results reports/test-results-core.json
- name: Report live tests
run: node tools/report-tests.mjs --title "Live Models Sweep" --results reports/test-results-live.json
- name: Report tts tests
run: node tools/report-tests.mjs --title "TTS Live" --results reports/test-results-tts.json
- name: Report models export
run: node tools/report-tests.mjs --title "Models Export" --results reports/test-results-models.json
- name: Report deep sweep
run: node tools/report-tests.mjs --title "Deep Sweep" --results reports/test-results-deep.json