[ci] Add DevTools jobs to gh actions
Adds the devtools build and test jobs to GH actions. This is more or less a straight copy of the jobs from circleci ghstack-source-id: f1071d754e340d440990760671a3932db74d0671 Pull Request resolved: https://github.com/facebook/react/pull/30347
Lauren Tan committed
Jul 16, 2024 at 12:11 UTC
acd5355b4090d3f2efd8ae76c32b22f9bcc0c359
1 file changed
+76
.github/workflows/runtime_build_and_test.yml
+76
@@ -312,3 +312,79 @@ jobs:
312
- name: Display structure of build
313
run: ls -R build
314
- run: yarn check-release-dependencies
315
+
316
+ # ----- DEVTOOLS -----
317
+ build_devtools_and_process_artifacts:
318
+ name: Build DevTools and process artifacts
319
+ needs: build_and_lint
320
+ runs-on: ubuntu-latest
321
+ steps:
322
+ - uses: actions/checkout@v4
323
+ - uses: actions/setup-node@v4
324
+ with:
325
+ node-version: 18.20.1
326
+ cache: yarn
327
+ cache-dependency-path: yarn.lock
328
+ - name: Restore cached node_modules
329
+ uses: actions/cache@v4
330
+ id: node_modules
331
+ with:
332
+ path: "**/node_modules"
333
+ key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
334
+ - run: yarn install --frozen-lockfile
335
+ - name: Restore archived build
336
+ uses: actions/download-artifact@v4
337
+ with:
338
+ path: build
339
+ merge-multiple: true
340
+ - run: ./scripts/circleci/pack_and_store_devtools_artifacts.sh
341
+ env:
342
+ RELEASE_CHANNEL: experimental
343
+ - name: Display structure of build
344
+ run: ls -R build
345
+ - name: Archive devtools build
346
+ uses: actions/upload-artifact@v4
347
+ with:
348
+ name: react-devtools
349
+ path: build/devtools.tgz
350
+ # Simplifies getting the extension for local testing
351
+ - name: Archive chrome extension
352
+ uses: actions/upload-artifact@v4
353
+ with:
354
+ name: react-devtools-chrome-extension
355
+ path: build/devtools/chrome-extension.zip
356
+ - name: Archive firefox extension
357
+ uses: actions/upload-artifact@v4
358
+ with:
359
+ name: react-devtools-firefox-extension
360
+ path: build/devtools/firefox-extension.zip
361
+
362
+ run_devtools_e2e_tests:
363
+ name: Run DevTools e2e tests
364
+ needs: build_devtools_and_process_artifacts
365
+ runs-on: ubuntu-latest
366
+ steps:
367
+ - uses: actions/checkout@v4
368
+ - uses: actions/setup-node@v4
369
+ with:
370
+ node-version: 18.20.1
371
+ cache: yarn
372
+ cache-dependency-path: yarn.lock
373
+ - name: Restore cached node_modules
374
+ uses: actions/cache@v4
375
+ id: node_modules
376
+ with:
377
+ path: "**/node_modules"
378
+ key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
379
+ - run: yarn install --frozen-lockfile
380
+ - name: Restore archived build
381
+ uses: actions/download-artifact@v4
382
+ with:
383
+ path: build
384
+ merge-multiple: true
385
+ - run: |
386
+ npx playwright install
387
+ sudo npx playwright install-deps
388
+ - run: ./scripts/circleci/run_devtools_e2e_tests.js
389
+ env:
390
+ RELEASE_CHANNEL: experimental