Scrape warning messages in CI (#22393)
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.
Andrew Clark committed
Sep 21, 2021 at 22:03 UTC
8fcfdfff7e61aeac82bd0482cff6af8e342ecadc
1 file changed
+20
.circleci/config.yml
+20
@@ -91,6 +91,22 @@ jobs:
91
- *restore_node_modules
92
- run: node ./scripts/tasks/flow-ci
93
94
+ scrape_warning_messages:
95
+ docker: *docker
96
+ environment: *environment
97
+
98
+ steps:
99
+ - checkout
100
+ - run: yarn workspaces info | head -n -1 > workspace_info.txt
101
+ - *restore_node_modules
102
+ - run:
103
+ command: |
104
+ mkdir -p ./build
105
+ node ./scripts/print-warnings/print-warnings.js > build/WARNINGS
106
+ - persist_to_workspace:
107
+ root: .
108
+ paths:
109
+ - build
110
111
yarn_build_combined:
112
docker: *docker
@@ -345,8 +361,12 @@ workflows:
361
- yarn_build_combined:
362
requires:
363
- setup
364
+ - scrape_warning_messages:
365
+ requires:
366
+ - setup
367
- process_artifacts_combined:
368
requires:
369
+ - scrape_warning_messages
370
- yarn_build_combined
371
- yarn_test_build:
372
requires: