8000 ci: Upload doc warnings and errors as artifacts · matplotlib/matplotlib@626d13c · GitHub
[go: up one dir, main page]

Skip to content

Commit 626d13c

Browse files
committed
ci: Upload doc warnings and errors as artifacts
1 parent cc85fb6 commit 626d13c

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

.circleci/config.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ commands:
141141
[ "$CIRCLE_PR_NUMBER" = "" ]; then
142142
export RELEASE_TAG='-t release'
143143
fi
144+
mkdir -p logs
144145
make html O="-T $RELEASE_TAG -j4 -w /tmp/sphinxerrorswarnings.log"
145146
rm -r build/html/_sources
146147
working_directory: doc
@@ -154,20 +155,35 @@ commands:
154155
- run:
155156
name: Extract possible build errors and warnings
156157
command: |
157-
(grep "WARNING\|ERROR" /tmp/sphinxerrorswarnings.log ||
158-
echo "No errors or warnings")
158+
(grep "WARNING\|ERROR" /tmp/sphinxerrorswarnings.log ||
159+
echo "No errors or warnings")
160+
# Save logs as an artifact, and convert from absolute paths to
161+
# repository-relative paths.
162+
sed "s~$PWD/~~" /tmp/sphinxerrorswarnings.log > \
163+
doc/logs/sphinx-errors-warnings.log
159164
when: always
165+
- store_artifacts:
166+
path: doc/logs/sphinx-errors-warnings.log
160167

161168
doc-show-deprecations:
162169
steps:
163170
- run:
164171
name: Extract possible deprecation warnings in examples and tutorials
165172
command: |
166-
(grep DeprecationWarning -r -l doc/build/html/gallery ||
167-
echo "No deprecation warnings in gallery")
168-
(grep DeprecationWarning -r -l doc/build/html/tutorials ||
169-
echo "No deprecation warnings in tutorials")
173+
(grep -rl DeprecationWarning doc/build/html/gallery ||
174+
echo "No deprecation warnings in gallery")
175+
(grep -rl DeprecationWarning doc/build/html/plot_types ||
176+
echo "No deprecation warnings in plot_types")
177+
(grep -rl DeprecationWarning doc/build/html/tutorials ||
178+
echo "No deprecation warnings in tutorials")
179+
# Save deprecations that are from this absolute directory, and
180+
# convert to repository-relative paths.
181+
(grep -Ero --no-filename "$PWD/.+DeprecationWarning.+$" \
182+
doc/build/html/{gallery,plot_types,tutorials} || echo) | \
183+
sed "s~$PWD/~~" > doc/logs/sphinx-deprecations.log
170184
when: always
185+
- store_artifacts:
186+
path: doc/logs/sphinx-deprecations.log
171187

172188
doc-bundle:
173189
steps:

0 commit comments

Comments
 (0)
0