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 31, 2021
1 parent bf07c91 commit 24feb63
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,20 @@ 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:
name: Search build artifacts for unminified errors
command: |
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 +427,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 24feb63

Please sign in to comment.