Skip to content

Commit

Permalink
Run extract-errors script in CI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acdlite committed Oct 6, 2021
1 parent 1a3adfa commit 51e7850
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 51e7850

Please sign in to comment.