Skip to content

Commit bdaa197

Browse files
committed
ci(dependency-review): include SFW JSON report artifact
1 parent 1925b18 commit bdaa197

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/dependency-review.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,22 @@ jobs:
149149
UV_PYTHON_DOWNLOADS: never
150150
run: |
151151
set -o pipefail
152+
set +e
152153
sfw uv sync --locked --extra test --extra dev 2>&1 | tee sfw-artifacts/sfw-uv-sync.log
154+
sync_status=${PIPESTATUS[0]}
155+
156+
report_path="$(
157+
sed -n 's/^.*sfw report written to: //p' sfw-artifacts/sfw-uv-sync.log |
158+
tail -n 1 |
159+
tr -d '\r'
160+
)"
161+
if [ -n "$report_path" ] && [ -f "$report_path" ]; then
162+
cp "$report_path" sfw-artifacts/sfw-report.json
163+
else
164+
echo "No SFW report JSON found in sync output." > sfw-artifacts/sfw-report-missing.txt
165+
fi
166+
167+
exit "$sync_status"
153168
154169
- name: Import smoke test
155170
run: |
@@ -209,7 +224,22 @@ jobs:
209224
UV_PYTHON_DOWNLOADS: never
210225
run: |
211226
set -o pipefail
227+
set +e
212228
sfw uv sync --locked --extra test --extra dev 2>&1 | tee sfw-artifacts/sfw-uv-sync.log
229+
sync_status=${PIPESTATUS[0]}
230+
231+
report_path="$(
232+
sed -n 's/^.*sfw report written to: //p' sfw-artifacts/sfw-uv-sync.log |
233+
tail -n 1 |
234+
tr -d '\r'
235+
)"
236+
if [ -n "$report_path" ] && [ -f "$report_path" ]; then
237+
cp "$report_path" sfw-artifacts/sfw-report.json
238+
else
239+
echo "No SFW report JSON found in sync output." > sfw-artifacts/sfw-report-missing.txt
240+
fi
241+
242+
exit "$sync_status"
213243
214244
- name: Import smoke test
215245
run: |

0 commit comments

Comments
 (0)