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 18 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 @@ -42,6 +42,19 @@ runs:
name: npm-logs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remove this task.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaniGuardiola Could you have another look? I've merged trunk into this PR and this should now be addressed.

path: C:\npm\cache\_logs

- 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-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}-${{ steps.node-version.outputs.NODE_VERSION }}
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