Skip to content
Open
Show file tree
Hide file tree
Changes from all 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/actions/mend-sca/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ runs:
run: pnpm config set store-dir '.pnpm-store' --global
shell: bash

# Make sure the pnpm store path exists so Node.js installation can find it

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Node.js installation will silently warn that it cannot find the pnpm cache without this. The store directory set in the step above doesn't actually create the folder. With this fix, Node.js installation can use pnpm caching and the workflow won't fail with a ❌ when it tries to clean up the Node.js installation step but can't find the cache folder (see here).

# https://github.com/actions/setup-node/issues/1137#issuecomment-2508963254
- name: Verify PNPM Cache Directory
shell: bash
run: |
PNPM_STORE_PATH="$( pnpm store path --silent )"
if [ ! -d "$PNPM_STORE_PATH" ]; then
echo "PNPM store directory does not exist, creating it."
mkdir -p "$PNPM_STORE_PATH"
else
echo "PNPM store directory exists."
fi

- name: Install Node.js
uses: actions/setup-node@v6
with:
Expand Down
15 changes: 14 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ runs:
run: pnpm config set store-dir ${{ inputs.pnpm-cache-folder }} --global
shell: bash

# Make sure the pnpm store path exists so Node.js installation can find it
# https://github.com/actions/setup-node/issues/1137#issuecomment-2508963254
- name: Verify PNPM Cache Directory
shell: bash
run: |
PNPM_STORE_PATH="$( pnpm store path --silent )"
if [ ! -d "$PNPM_STORE_PATH" ]; then
echo "PNPM store directory does not exist, creating it."
mkdir -p "$PNPM_STORE_PATH"
else
echo "PNPM store directory exists."
fi

- uses: actions/setup-node@v6
with:
node-version-file: ${{ inputs.node-version-file }}
Expand Down Expand Up @@ -65,7 +78,7 @@ runs:
shell: bash
run: pnpm nx sync:check

- name: Run Nx build/lint/test/e2e
- name: Run Nx build, lint, test, typecheck, e2e
run: pnpm exec nx affected -t build lint test typecheck e2e-ci
shell: bash

Expand Down
Loading
Loading