Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload npm logs during debug or failure runs #61289

Open
wants to merge 20 commits into
base: trunk
Choose a base branch
from
Open
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ runs:
run: npm ci
shell: bash

- name: Find npm log location
id: npm-cache-location
if: ${{ failure() || runner.debug }}
run: echo "NODE_CACHE_LOCATION=$(npm config get cache)" >> $GITHUB_OUTPUT
shell: bash

- name: Upload logs as artifact
if: ${{ failure() || runner.debug }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: npm-logs-${{ matrix.os }}-${{ matrix.node }}
path: '${{ steps.npm-cache-location.outputs.NODE_CACHE_LOCATION }}/_logs'

# On cache hit, we run the post-install script to match the native `npm ci` behavior.
# An example of this is to patch `node_modules` using patch-package.
- name: Post-install
Expand Down
Loading