Skip to content
Merged
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
22 changes: 22 additions & 0 deletions .github/workflows/self-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,28 @@ jobs:
- name: Test
run: npm test

# The release workflows install the toolkit from inside the caller's
# checkout. A caller's pnpm pin, pnpm-workspace.yaml or .npmrc must not
# change that install, or it can silently install the caller's
# packages instead.
- name: Toolkit install ignores the caller's pnpm config
shell: bash
run: |
CALLER="$RUNNER_TEMP/caller"
mkdir -p "$CALLER"
git archive --prefix=.release-toolkit/ HEAD | tar -x -C "$CALLER"
cd "$CALLER"
echo '{"name":"caller","private":true,"packageManager":"pnpm@12.14.0"}' > package.json
printf 'nodeLinker: hoisted\nminimumReleaseAge: 999999999\n' > pnpm-workspace.yaml
echo 'node-linker=hoisted' > .npmrc

pnpm --dir .release-toolkit install --frozen-lockfile --ignore-scripts | tee "$RUNNER_TEMP/toolkit-install.log"

TOOLKIT_PNPM="$(node -p "require('./.release-toolkit/package.json').packageManager.split('@')[1]")"
grep -q "using pnpm v$TOOLKIT_PNPM" "$RUNNER_TEMP/toolkit-install.log"
test -f .release-toolkit/node_modules/@semantic-release/commit-analyzer/package.json
test ! -e .release-toolkit/node_modules/handlebars

lint-workflows:
name: Lint workflows
runs-on: ubuntu-latest
Expand Down
Loading