From 51e7850b356fb45e16fc5c36aad4f88b93e724c0 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Wed, 6 Oct 2021 17:56:35 -0400 Subject: [PATCH] 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. --- .circleci/config.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d1eb1e8b3381..1eb856468928e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -209,7 +209,18 @@ jobs: - run: yarn workspaces info | head -n -1 > workspace_info.txt - *restore_node_modules - run: yarn lint-build - - run: scripts/circleci/check_minified_errors.sh + + check_error_codes: + docker: *docker + environment: *environment + steps: + - checkout + - attach_workspace: *attach_workspace + - run: yarn workspaces info | head -n -1 > workspace_info.txt + - *restore_node_modules + - run: + yarn extract-errors2 + git diff || (echo "Found unminified errors. Either update the error codes map or disable error minification for the affected build, if appropriate." && false) yarn_test: docker: *docker @@ -414,6 +425,9 @@ workflows: - yarn_lint_build: requires: - yarn_build_combined + - check_error_codes: + requires: + - yarn_build_combined - RELEASE_CHANNEL_stable_yarn_test_dom_fixtures: requires: - yarn_build_combined