[ci] Add check_error_codes to gh actions
ghstack-source-id: b6dbee275be58c14341dec1a823ff7773e5a6a59 Pull Request resolved: https://github.com/facebook/react/pull/30354
Lauren Tan committed
Jul 16, 2024 at 14:35 UTC
43d535f545bf3f7a0c155903432c5bdf327346c9
1 file changed
+30
.github/workflows/runtime_build_and_test.yml
+30
@@ -290,6 +290,36 @@ jobs:
290
./build.tgz
291
./build2.tgz
292
293
+ check_error_codes:
294
+ name: Search build artifacts for unminified errors
295
+ needs: build_and_lint
296
+ runs-on: ubuntu-latest
297
+ steps:
298
+ - uses: actions/checkout@v4
299
+ - uses: actions/setup-node@v4
300
+ with:
301
+ node-version: 18.20.1
302
+ cache: yarn
303
+ cache-dependency-path: yarn.lock
304
+ - name: Restore cached node_modules
305
+ uses: actions/cache@v4
306
+ id: node_modules
307
+ with:
308
+ path: "**/node_modules"
309
+ key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
310
+ - run: yarn install --frozen-lockfile
311
+ - name: Restore archived build
312
+ uses: actions/download-artifact@v4
313
+ with:
314
+ path: build
315
+ merge-multiple: true
316
+ - name: Display structure of build
317
+ run: ls -R build
318
+ - name: Search build artifacts for unminified errors
319
+ run: |
320
+ yarn extract-errors
321
+ git diff --quiet || (echo "Found unminified errors. Either update the error codes map or disable error minification for the affected build, if appropriate." && false)
322
+
323
check_release_dependencies:
324
name: Check release dependencies
325
needs: build_and_lint