|
46 | 46 | run: |
|
47 | 47 | yarn install
|
48 | 48 |
|
49 |
| - lint: |
50 |
| - name: Run Lint |
51 |
| - runs-on: ubuntu-latest |
52 |
| - needs: install |
53 |
| - steps: |
54 |
| - - name: Checkout |
55 |
| - uses: actions/checkout@v4 |
56 |
| - |
57 |
| - - name: Setup Node |
58 |
| - uses: actions/setup-node@v4 |
59 |
| - with: |
60 |
| - node-version: 20 |
61 |
| - |
62 |
| - - name: Cache node_modules |
63 |
| - id: cache-node-modules |
64 |
| - uses: actions/cache@v4 |
65 |
| - env: |
66 |
| - cache-name: cache-gazebo-node-modules |
67 |
| - with: |
68 |
| - path: | |
69 |
| - node_modules |
70 |
| - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} |
71 |
| - restore-keys: | |
72 |
| - ${{ runner.os }}-${{ env.cache-name }}- |
73 |
| -
|
74 |
| - - name: Run linter |
75 |
| - run: | |
76 |
| - yarn lint |
77 |
| -
|
78 |
| - type-check: |
79 |
| - name: Run Type Checker |
80 |
| - runs-on: ubuntu-latest |
81 |
| - needs: install |
82 |
| - steps: |
83 |
| - - name: Checkout |
84 |
| - uses: actions/checkout@v4 |
85 |
| - |
86 |
| - - name: Setup Node |
87 |
| - uses: actions/setup-node@v4 |
88 |
| - with: |
89 |
| - node-version: 20 |
90 |
| - |
91 |
| - - name: Cache node_modules |
92 |
| - id: cache-node-modules |
93 |
| - uses: actions/cache@v4 |
94 |
| - env: |
95 |
| - cache-name: cache-gazebo-node-modules |
96 |
| - with: |
97 |
| - path: | |
98 |
| - node_modules |
99 |
| - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} |
100 |
| - restore-keys: | |
101 |
| - ${{ runner.os }}-${{ env.cache-name }}- |
102 |
| -
|
103 |
| - - name: Run TSC |
104 |
| - run: | |
105 |
| - yarn type-check |
106 |
| -
|
107 |
| - format-check: |
108 |
| - name: Run Prettier Check |
109 |
| - runs-on: ubuntu-latest |
110 |
| - needs: install |
111 |
| - steps: |
112 |
| - - name: Checkout |
113 |
| - uses: actions/checkout@v4 |
114 |
| - |
115 |
| - - name: Setup Node |
116 |
| - uses: actions/setup-node@v4 |
117 |
| - with: |
118 |
| - node-version: 20 |
119 |
| - |
120 |
| - - name: Cache node_modules |
121 |
| - id: cache-node-modules |
122 |
| - uses: actions/cache@v4 |
123 |
| - env: |
124 |
| - cache-name: cache-gazebo-node-modules |
125 |
| - with: |
126 |
| - path: | |
127 |
| - node_modules |
128 |
| - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} |
129 |
| - restore-keys: | |
130 |
| - ${{ runner.os }}-${{ env.cache-name }}- |
131 |
| -
|
132 |
| - - name: Run Prettier |
133 |
| - run: | |
134 |
| - yarn format-check |
135 |
| -
|
136 | 49 | codecov-startup:
|
137 | 50 | name: Codecov Startup
|
138 | 51 | needs: install
|
@@ -202,236 +115,19 @@ jobs:
|
202 | 115 | ENABLE_TEST_REPORTER: true
|
203 | 116 | TEST_LIST: ${{ tojson(fromjson(needs.runner-indexes-vitest.outputs.test_list_array)[matrix.runner-index]) }}
|
204 | 117 |
|
205 |
| - - name: Upload test results to Codecov |
206 |
| - uses: codecov/test-results-action@v1 |
207 |
| - if: ${{ !cancelled() && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov'}} |
208 |
| - with: |
209 |
| - token: ${{ secrets.CODECOV_ORG_TOKEN }} |
210 |
| - url: ${{ secrets.CODECOV_URL }} |
211 |
| - |
212 |
| - - name: Upload test results to Codecov staging |
213 |
| - uses: codecov/test-results-action@v1 |
214 |
| - if: ${{ !cancelled() && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov'}} |
215 |
| - with: |
216 |
| - token: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} |
217 |
| - url: ${{ secrets.CODECOV_STAGING_URL }} |
218 |
| - |
219 | 118 | - name: Upload test results to Codecov QA
|
220 | 119 | uses: codecov/test-results-action@v1
|
221 | 120 | if: ${{ !cancelled() && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov'}}
|
222 | 121 | with:
|
223 | 122 | token: ${{ secrets.CODECOV_QA_GLOBAL_UPLOAD_TOKEN }}
|
224 | 123 | url: ${{ secrets.CODECOV_QA_URL }}
|
225 | 124 |
|
226 |
| - - name: Upload test results to Codecov public QA |
227 |
| - uses: codecov/test-results-action@v1 |
228 |
| - if: ${{ !cancelled() && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov'}} |
229 |
| - with: |
230 |
| - token: ${{ secrets.CODECOV_PUBLIC_QA_TOKEN }} |
231 |
| - url: ${{ secrets.CODECOV_PUBLIC_QA_URL }} |
232 |
| - |
233 | 125 | - name: Install CLI
|
234 | 126 | if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
|
235 | 127 | run: |
|
236 | 128 | make test_env.install_cli
|
237 | 129 |
|
238 |
| - ## Don't upload on forks for now. |
239 |
| - - name: Upload coverage to Production |
240 |
| - if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} |
241 |
| - run: | |
242 |
| - codecovcli -u ${{ secrets.CODECOV_URL }} do-upload -t ${{ secrets.CODECOV_ORG_TOKEN }} --fail-on-error --name "VITEST-${{ matrix.runner-index }}" |
243 |
| -
|
244 |
| - - name: Upload coverage to Staging |
245 |
| - if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} |
246 |
| - run: | |
247 |
| - codecovcli -u ${{ secrets.CODECOV_STAGING_URL }} do-upload -t ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} --fail-on-error |
248 |
| -
|
249 | 130 | - name: Upload coverage to QA
|
250 | 131 | if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
|
251 | 132 | run: |
|
252 | 133 | codecovcli -u ${{ secrets.CODECOV_QA_URL }} do-upload -t ${{ secrets.CODECOV_QA_GLOBAL_UPLOAD_TOKEN }} --fail-on-error
|
253 |
| -
|
254 |
| - - name: Upload coverage to Public QA |
255 |
| - if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} |
256 |
| - run: | |
257 |
| - codecovcli -u ${{ secrets.CODECOV_PUBLIC_QA_URL }} do-upload -t ${{ secrets.CODECOV_PUBLIC_QA_TOKEN }} --fail-on-error |
258 |
| -
|
259 |
| - upload-bundle-stats-to-prod: |
260 |
| - name: Upload Bundle Stats - Production |
261 |
| - runs-on: ubuntu-latest |
262 |
| - needs: install |
263 |
| - if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} |
264 |
| - steps: |
265 |
| - - name: Checkout |
266 |
| - uses: actions/checkout@v4 |
267 |
| - with: |
268 |
| - fetch-depth: 2 |
269 |
| - |
270 |
| - - name: Setup Node |
271 |
| - uses: actions/setup-node@v4 |
272 |
| - with: |
273 |
| - node-version: 20 |
274 |
| - |
275 |
| - - name: Cache node_modules |
276 |
| - id: cache-node-modules |
277 |
| - uses: actions/cache@v4 |
278 |
| - env: |
279 |
| - cache-name: cache-gazebo-node-modules |
280 |
| - with: |
281 |
| - path: | |
282 |
| - node_modules |
283 |
| - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} |
284 |
| - restore-keys: | |
285 |
| - ${{ runner.os }}-${{ env.cache-name }}- |
286 |
| -
|
287 |
| - - name: Build and upload stats |
288 |
| - run: | |
289 |
| - yarn build |
290 |
| - env: |
291 |
| - CODECOV_API_URL: ${{ secrets.CODECOV_API_URL }} |
292 |
| - CODECOV_ORG_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} |
293 |
| - CODECOV_BUNDLE_NAME: 'gazebo-production' |
294 |
| - UPLOAD_CODECOV_BUNDLE_STATS: true |
295 |
| - # The head sha aligns with how the sha used in prod builds |
296 |
| - GAZEBO_SHA: ${{ github.event.pull_request.head.sha }} |
297 |
| - |
298 |
| - upload-bundle-stats-to-staging: |
299 |
| - name: Upload Bundle Stats - Staging |
300 |
| - runs-on: ubuntu-latest |
301 |
| - needs: install |
302 |
| - if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} |
303 |
| - steps: |
304 |
| - - name: Checkout |
305 |
| - uses: actions/checkout@v4 |
306 |
| - with: |
307 |
| - fetch-depth: 2 |
308 |
| - |
309 |
| - - name: Setup Node |
310 |
| - uses: actions/setup-node@v4 |
311 |
| - with: |
312 |
| - node-version: 20 |
313 |
| - |
314 |
| - - name: Cache node_modules |
315 |
| - id: cache-node-modules |
316 |
| - uses: actions/cache@v4 |
317 |
| - env: |
318 |
| - cache-name: cache-gazebo-node-modules |
319 |
| - with: |
320 |
| - path: | |
321 |
| - node_modules |
322 |
| - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} |
323 |
| - restore-keys: | |
324 |
| - ${{ runner.os }}-${{ env.cache-name }}- |
325 |
| -
|
326 |
| - - name: Build and upload stats |
327 |
| - run: | |
328 |
| - yarn build |
329 |
| - env: |
330 |
| - CODECOV_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }} |
331 |
| - CODECOV_ORG_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} |
332 |
| - CODECOV_BUNDLE_NAME: 'gazebo-staging' |
333 |
| - UPLOAD_CODECOV_BUNDLE_STATS: true |
334 |
| - # The head sha aligns with how the sha used in prod builds |
335 |
| - GAZEBO_SHA: ${{ github.event.pull_request.head.sha }} |
336 |
| - |
337 |
| - storybook: |
338 |
| - name: Run storybook |
339 |
| - runs-on: ubuntu-latest |
340 |
| - needs: install |
341 |
| - if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref, 'refs/heads/dependabot') && github.repository_owner == 'codecov' }} |
342 |
| - steps: |
343 |
| - - name: Checkout |
344 |
| - uses: actions/checkout@v4 |
345 |
| - with: |
346 |
| - fetch-depth: 0 |
347 |
| - |
348 |
| - - name: Setup Node |
349 |
| - uses: actions/setup-node@v4 |
350 |
| - with: |
351 |
| - node-version: 20 |
352 |
| - |
353 |
| - - name: Cache node_modules |
354 |
| - id: cache-node-modules |
355 |
| - uses: actions/cache@v4 |
356 |
| - env: |
357 |
| - cache-name: cache-gazebo-node-modules |
358 |
| - with: |
359 |
| - path: | |
360 |
| - node_modules |
361 |
| - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} |
362 |
| - restore-keys: | |
363 |
| - ${{ runner.os }}-${{ env.cache-name }}- |
364 |
| -
|
365 |
| - - name: Deploy to Chromatic |
366 |
| - run: | |
367 |
| - yarn chromatic |
368 |
| - env: |
369 |
| - CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} |
370 |
| - |
371 |
| - fossa: |
372 |
| - name: Run Fossa |
373 |
| - runs-on: ubuntu-latest |
374 |
| - needs: install |
375 |
| - if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} |
376 |
| - steps: |
377 |
| - - name: Checkout |
378 |
| - uses: actions/checkout@v4 |
379 |
| - |
380 |
| - - name: Setup Node |
381 |
| - uses: actions/setup-node@v4 |
382 |
| - with: |
383 |
| - node-version: 20 |
384 |
| - |
385 |
| - - name: Run Fossa |
386 |
| - |
387 |
| - with: |
388 |
| - api-key: ${{secrets.FOSSA_API_KEY}} |
389 |
| - |
390 |
| - build: |
391 |
| - name: Build App |
392 |
| - runs-on: ubuntu-latest |
393 |
| - needs: [install, test-vitest] |
394 |
| - steps: |
395 |
| - - name: Checkout |
396 |
| - uses: actions/checkout@v4 |
397 |
| - |
398 |
| - - name: Setup Node |
399 |
| - uses: actions/setup-node@v4 |
400 |
| - with: |
401 |
| - node-version: 20 |
402 |
| - |
403 |
| - - name: Cache node_modules |
404 |
| - id: cache-node-modules |
405 |
| - uses: actions/cache@v4 |
406 |
| - env: |
407 |
| - cache-name: cache-gazebo-node-modules |
408 |
| - with: |
409 |
| - path: | |
410 |
| - node_modules |
411 |
| - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} |
412 |
| - restore-keys: | |
413 |
| - ${{ runner.os }}-${{ env.cache-name }}- |
414 |
| -
|
415 |
| - - name: Build React App |
416 |
| - run: | |
417 |
| - yarn build |
418 |
| -
|
419 |
| - build-self-hosted: |
420 |
| - name: Build Self Hosted Image |
421 |
| - secrets: inherit |
422 |
| - if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} |
423 |
| - uses: codecov/gha-workflows/.github/workflows/[email protected] |
424 |
| - with: |
425 |
| - repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-frontend' }} |
426 |
| - cache_requirements: false |
427 |
| - |
428 |
| - self-hosted: |
429 |
| - name: Push Self Hosted Image |
430 |
| - needs: [build-self-hosted, test-vitest] |
431 |
| - secrets: inherit |
432 |
| - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository_owner == 'codecov' }} |
433 |
| - uses: codecov/gha-workflows/.github/workflows/[email protected] |
434 |
| - with: |
435 |
| - push_rolling: true |
436 |
| - repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-frontend' }} |
437 |
| - cache_requirements: false |
0 commit comments