|
52 | 52 | - os: macos-latest # macos-latest has issues with node14 |
53 | 53 | node-version: "14" |
54 | 54 | steps: |
| 55 | + - name: test npm |
| 56 | + run: npm --version |
55 | 57 | - name: Checkout |
56 | 58 | # see https://github.com/actions/checkout |
57 | 59 | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
@@ -102,6 +104,29 @@ jobs: |
102 | 104 | with: |
103 | 105 | node-version: ${{ matrix.node-version }} |
104 | 106 | package-manager-cache: false # must not usecaches. we want the latest, always |
| 107 | + - name: Remove Yarn 1 from PATH (Windows) |
| 108 | + if: ${{ runner.os == 'Windows' }} |
| 109 | + shell: pwsh |
| 110 | + run: | |
| 111 | + Set-PSDebug -Trace 1 |
| 112 | + # find yarn |
| 113 | + Get-Alias yarn -ErrorAction SilentlyContinue |
| 114 | + Get-ChildItem Function:\yarn -ErrorAction SilentlyContinue |
| 115 | + Get-Command yarn |
| 116 | + # remove yarn |
| 117 | + Remove-Item Alias:\yarn -Verbose -ErrorAction SilentlyContinue |
| 118 | + Remove-Item Function:\yarn -Verbose -ErrorAction SilentlyContinue |
| 119 | + Remove-Item "C:\npm\prefix\yarn*" -Verbose -Force -ErrorAction SilentlyContinue |
| 120 | + # verify |
| 121 | + Get-Alias yarn -ErrorAction SilentlyContinue |
| 122 | + Get-ChildItem Function:\yarn -ErrorAction SilentlyContinue |
| 123 | + Get-Command yarn -ErrorAction SilentlyContinue |
| 124 | + - name: enable yarn |
| 125 | + run: |- |
| 126 | + corepack enable yarn |
| 127 | + corepack prepare yarn@latest --activate |
| 128 | + yarn --version |
| 129 | + working-directory: .. # prevent evaluation of package.json |
105 | 130 | - name: install project |
106 | 131 | run: > |
107 | 132 | yarn install |
@@ -148,11 +173,30 @@ jobs: |
148 | 173 | with: |
149 | 174 | node-version: ${{ matrix.node-version }} |
150 | 175 | package-manager-cache: false # must not usecaches. we want the latest, always |
| 176 | + - name: Remove PNPM from PATH (Windows) |
| 177 | + if: ${{ runner.os == 'Windows' }} |
| 178 | + shell: pwsh |
| 179 | + run: | |
| 180 | + Set-PSDebug -Trace 1 |
| 181 | + # find pnpm |
| 182 | + Get-Alias pnpm -ErrorAction SilentlyContinue |
| 183 | + Get-ChildItem Function:\pnpm -ErrorAction SilentlyContinue |
| 184 | + Get-Command pnpm -ErrorAction SilentlyContinue |
| 185 | + # remove pnpm |
| 186 | + Remove-Item Alias:\pnpm -Verbose -ErrorAction SilentlyContinue |
| 187 | + Remove-Item Function:\pnpm -Verbose -ErrorAction SilentlyContinue |
| 188 | + Remove-Item "C:\npm\prefix\pnpm*" -Verbose -Force -ErrorAction SilentlyContinue |
| 189 | + # verify |
| 190 | + Get-Alias pnpm -ErrorAction SilentlyContinue |
| 191 | + Get-ChildItem Function:\pnpm -ErrorAction SilentlyContinue |
| 192 | + Get-Command pnpm -ErrorAction SilentlyContinue |
151 | 193 | - name: setup pnpm |
152 | 194 | ## see https://github.com/pnpm/action-setup |
153 | 195 | uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0 |
154 | 196 | with: |
155 | 197 | version: ${{ matrix.pnpm-version }} |
| 198 | + - name: test pnpm |
| 199 | + run: pnpm --version |
156 | 200 | - name: install project |
157 | 201 | run: > |
158 | 202 | pnpm install |
|
0 commit comments