From 359ceea48102158dd5aad66e7867ff4f75af4f4f Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Tue, 21 Sep 2021 21:42:52 -0400 Subject: [PATCH] Scrape warning messages in CI There's a downstream workflow that runs the `print-warnings` command. We can make it faster by scraping the warnings in CI and storing the result as a build artifact. --- .circleci/config.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 168dcdeb74943..7d1eb1e8b3381 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -91,6 +91,22 @@ jobs: - *restore_node_modules - run: node ./scripts/tasks/flow-ci + scrape_warning_messages: + docker: *docker + environment: *environment + + steps: + - checkout + - run: yarn workspaces info | head -n -1 > workspace_info.txt + - *restore_node_modules + - run: + command: | + mkdir -p ./build + node ./scripts/print-warnings/print-warnings.js > build/WARNINGS + - persist_to_workspace: + root: . + paths: + - build yarn_build_combined: docker: *docker @@ -345,8 +361,12 @@ workflows: - yarn_build_combined: requires: - setup + - scrape_warning_messages: + requires: + - setup - process_artifacts_combined: requires: + - scrape_warning_messages - yarn_build_combined - yarn_test_build: requires: