Skip to content

Commit 5013b9c

Browse files
committed
ci: debug package managers
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent 1e869a3 commit 5013b9c

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
- os: macos-latest # macos-latest has issues with node14
5353
node-version: "14"
5454
steps:
55+
- name: test npm
56+
run: npm --version
5557
- name: Checkout
5658
# see https://github.com/actions/checkout
5759
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -93,6 +95,29 @@ jobs:
9395
- os: macos-latest # macos-latest has issues with node14
9496
node-version: "14"
9597
steps:
98+
- name: Remove Yarn 1 from PATH (Windows)
99+
if: ${{ runner.os == 'Windows' }}
100+
shell: pwsh
101+
run: |
102+
Set-PSDebug -Trace 1
103+
# find yarn
104+
Get-Alias yarn -ErrorAction SilentlyContinue
105+
Get-ChildItem Function:\yarn -ErrorAction SilentlyContinue
106+
Get-Command yarn
107+
# remove yarn
108+
Remove-Item Alias:\yarn -Verbose -ErrorAction SilentlyContinue
109+
Remove-Item Function:\yarn -Verbose -ErrorAction SilentlyContinue
110+
Remove-Item "C:\npm\prefix\yarn*" -Verbose -Force -ErrorAction SilentlyContinue
111+
# verify
112+
Get-Alias yarn -ErrorAction SilentlyContinue
113+
Get-ChildItem Function:\yarn -ErrorAction SilentlyContinue
114+
Get-Command yarn -ErrorAction SilentlyContinue
115+
- name: enable yarn
116+
run: |-
117+
corepack enable yarn
118+
corepack prepare yarn@latest --activate
119+
yarn --version
120+
working-directory: .. # prevent evaluation of package.json
96121
- name: Checkout
97122
## see https://github.com/actions/checkout
98123
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -139,6 +164,23 @@ jobs:
139164
node-version: "14"
140165
pnpm-version: "latest-7" # see https://www.npmjs.com/package/pnpm/?activeTab=versions
141166
steps:
167+
- name: Remove PNPM from PATH (Windows)
168+
if: ${{ runner.os == 'Windows' }}
169+
shell: pwsh
170+
run: |
171+
Set-PSDebug -Trace 1
172+
# find pnpm
173+
Get-Alias pnpm -ErrorAction SilentlyContinue
174+
Get-ChildItem Function:\pnpm -ErrorAction SilentlyContinue
175+
Get-Command pnpm -ErrorAction SilentlyContinue
176+
# remove pnpm
177+
Remove-Item Alias:\pnpm -Verbose -ErrorAction SilentlyContinue
178+
Remove-Item Function:\pnpm -Verbose -ErrorAction SilentlyContinue
179+
Remove-Item "C:\npm\prefix\pnpm*" -Verbose -Force -ErrorAction SilentlyContinue
180+
# verify
181+
Get-Alias pnpm -ErrorAction SilentlyContinue
182+
Get-ChildItem Function:\pnpm -ErrorAction SilentlyContinue
183+
Get-Command pnpm -ErrorAction SilentlyContinue
142184
- name: Checkout
143185
# see https://github.com/actions/checkout
144186
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -153,6 +195,8 @@ jobs:
153195
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
154196
with:
155197
version: ${{ matrix.pnpm-version }}
198+
- name: test pnpm
199+
run: pnpm --version
156200
- name: install project
157201
run: >
158202
pnpm install

0 commit comments

Comments
 (0)