Skip to content

Commit cb35ab1

Browse files
committed
ci: write npm failure log to github step summary
1 parent 9a446e6 commit cb35ab1

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,15 @@ jobs:
3232
npm -v
3333
3434
- name: Install Dependencies
35-
run: npm install --no-audit
36-
37-
- name: Debug npm Failure
38-
if: failure()
3935
shell: bash
4036
run: |
41-
echo "=== NPM DEBUG LOGS ==="
42-
for dir in "$HOME" "$APPDATA" "$LOCALAPPDATA" "/home/runner" "C:/Users"; do
43-
if [ -d "$dir" ]; then
44-
find "$dir" -name "*debug*.log" -exec cat {} + 2>/dev/null || true
45-
fi
46-
done
37+
if ! npm install --no-audit 2>&1 | tee npm-install.log; then
38+
echo "## NPM Install Failure Output" >> $GITHUB_STEP_SUMMARY
39+
echo '```text' >> $GITHUB_STEP_SUMMARY
40+
tail -n 120 npm-install.log >> $GITHUB_STEP_SUMMARY
41+
echo '```' >> $GITHUB_STEP_SUMMARY
42+
exit 1
43+
fi
4744
4845
- name: Build Frontend Application
4946
run: npm run build:frontend

0 commit comments

Comments
 (0)