Skip to content

Commit d2f67ff

Browse files
authored
Limit mpl baseline generation to selected tests (#533)
1 parent 18f6e04 commit d2f67ff

1 file changed

Lines changed: 8 additions & 28 deletions

File tree

.github/workflows/build-ultraplot.yml

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -124,23 +124,16 @@ jobs:
124124
}
125125
FILTERED_NODEIDS="$(filter_nodeids)"
126126
if [ -z "${FILTERED_NODEIDS}" ]; then
127-
echo "No valid nodeids found; running full suite."
128-
pytest -q --tb=short --disable-warnings -W ignore \
129-
--mpl-generate-path=./ultraplot/tests/baseline/ \
130-
--mpl-default-style="./ultraplot.yml" \
131-
ultraplot/tests || status=$?
127+
echo "No valid nodeids found; skipping baseline generation."
128+
exit 0
132129
else
133130
pytest -q --tb=short --disable-warnings -W ignore \
134131
--mpl-generate-path=./ultraplot/tests/baseline/ \
135132
--mpl-default-style="./ultraplot.yml" \
136133
${FILTERED_NODEIDS} || status=$?
137134
if [ "$status" -eq 4 ] || [ "$status" -eq 5 ]; then
138-
echo "No tests collected from selected nodeids on base; running full suite."
139-
status=0
140-
pytest -q --tb=short --disable-warnings -W ignore \
141-
--mpl-generate-path=./ultraplot/tests/baseline/ \
142-
--mpl-default-style="./ultraplot.yml" \
143-
ultraplot/tests || status=$?
135+
echo "No tests collected from selected nodeids on base; skipping baseline generation."
136+
exit 0
144137
fi
145138
fi
146139
exit "$status"
@@ -178,14 +171,8 @@ jobs:
178171
}
179172
FILTERED_NODEIDS="$(filter_nodeids)"
180173
if [ -z "${FILTERED_NODEIDS}" ]; then
181-
echo "No valid nodeids found; running full suite."
182-
pytest -q --tb=short --disable-warnings -W ignore \
183-
--mpl \
184-
--mpl-baseline-path=./ultraplot/tests/baseline \
185-
--mpl-results-path=./results/ \
186-
--mpl-generate-summary=html \
187-
--mpl-default-style="./ultraplot.yml" \
188-
ultraplot/tests || status=$?
174+
echo "No valid nodeids found; skipping image comparison."
175+
exit 0
189176
else
190177
pytest -q --tb=short --disable-warnings -W ignore \
191178
--mpl \
@@ -195,15 +182,8 @@ jobs:
195182
--mpl-default-style="./ultraplot.yml" \
196183
${FILTERED_NODEIDS} || status=$?
197184
if [ "$status" -eq 4 ] || [ "$status" -eq 5 ]; then
198-
echo "No tests collected from selected nodeids; running full suite."
199-
status=0
200-
pytest -q --tb=short --disable-warnings -W ignore \
201-
--mpl \
202-
--mpl-baseline-path=./ultraplot/tests/baseline \
203-
--mpl-results-path=./results/ \
204-
--mpl-generate-summary=html \
205-
--mpl-default-style="./ultraplot.yml" \
206-
ultraplot/tests || status=$?
185+
echo "No tests collected from selected nodeids; skipping image comparison."
186+
exit 0
207187
fi
208188
fi
209189
exit "$status"

0 commit comments

Comments
 (0)