Skip to content

Commit 24feb63

Browse files
committed
Run extract-errors script in CI
The lint_build job already checks for unminified errors, but the output isn't super helpful. Instead I've added a new job that runs the extract-errors script and fails the build if `codes.json` changes. It also outputs the expected diff so you can easily see which messages were missing from the map.
1 parent bf07c91 commit 24feb63

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.circleci/config.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,20 @@ jobs:
209209
- run: yarn workspaces info | head -n -1 > workspace_info.txt
210210
- *restore_node_modules
211211
- run: yarn lint-build
212-
- run: scripts/circleci/check_minified_errors.sh
212+
213+
check_error_codes:
214+
docker: *docker
215+
environment: *environment
216+
steps:
217+
- checkout
218+
- attach_workspace: *attach_workspace
219+
- run: yarn workspaces info | head -n -1 > workspace_info.txt
220+
- *restore_node_modules
221+
- run:
222+
name: Search build artifacts for unminified errors
223+
command: |
224+
yarn extract-errors2
225+
git diff || (echo "Found unminified errors. Either update the error codes map or disable error minification for the affected build, if appropriate." && false)
213226
214227
yarn_test:
215228
docker: *docker
@@ -414,6 +427,9 @@ workflows:
414427
- yarn_lint_build:
415428
requires:
416429
- yarn_build_combined
430+
- check_error_codes:
431+
requires:
432+
- yarn_build_combined
417433
- RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
418434
requires:
419435
- yarn_build_combined

0 commit comments

Comments
 (0)