|
93 | 93 | vp env doctor |
94 | 94 | vp env run --node 24 -- node -p "process.versions" |
95 | 95 |
|
| 96 | + - name: Test global package install |
| 97 | + run: | |
| 98 | + export PATH="$HOME/.vite-plus/bin:$PATH" |
| 99 | +
|
| 100 | + # Test 1: Install a JS-based CLI (typescript) |
| 101 | + npm install -g typescript |
| 102 | + tsc --version |
| 103 | +
|
| 104 | + # Test 2: Verify the package was installed correctly |
| 105 | + ls -la ~/.vite-plus/packages/typescript/ |
| 106 | + ls -la ~/.vite-plus/bin/ |
| 107 | +
|
| 108 | + # Test 3: Uninstall |
| 109 | + npm uninstall -g typescript |
| 110 | +
|
| 111 | + # Test 4: Verify uninstall removed shim |
| 112 | + echo "Checking bin dir after uninstall:" |
| 113 | + ls -la ~/.vite-plus/bin/ |
| 114 | + echo "Checking if tsc shim file exists:" |
| 115 | + if [ -f ~/.vite-plus/bin/tsc ]; then |
| 116 | + echo "Error: tsc shim file still exists at ~/.vite-plus/bin/tsc" |
| 117 | + exit 1 |
| 118 | + fi |
| 119 | + echo "tsc shim removed successfully" |
| 120 | +
|
96 | 121 | test-install-sh-arm64: |
97 | 122 | name: Test install.sh (Linux ARM64 glibc via QEMU) |
98 | 123 | runs-on: ubuntu-latest |
@@ -143,7 +168,22 @@ jobs: |
143 | 168 | vp env doctor |
144 | 169 |
|
145 | 170 | export VITE_LOG=trace |
146 | | - vp env run --node 24 -- node -p "process.versions" |
| 171 | + vp env run --node 24 -- node -p \"process.versions\" |
| 172 | +
|
| 173 | + # Test global package install |
| 174 | + npm install -g typescript |
| 175 | + tsc --version |
| 176 | + ls -la ~/.vite-plus/packages/typescript/ |
| 177 | + ls -la ~/.vite-plus/bin/ |
| 178 | + npm uninstall -g typescript |
| 179 | + echo \"Checking bin dir after uninstall:\" |
| 180 | + ls -la ~/.vite-plus/bin/ |
| 181 | + if [ -f ~/.vite-plus/bin/tsc ]; then |
| 182 | + echo \"Error: tsc shim file still exists\" |
| 183 | + exit 1 |
| 184 | + fi |
| 185 | + echo \"tsc shim removed successfully\" |
| 186 | +
|
147 | 187 | # FIXME: qemu: uncaught target signal 11 (Segmentation fault) - core dumped |
148 | 188 | # vp new create-vite --no-interactive --no-agent -- hello --no-interactive -t vanilla |
149 | 189 | # cd hello && vp run build |
@@ -202,3 +242,29 @@ jobs: |
202 | 242 | $env:Path = "$env:USERPROFILE\.vite-plus\bin;$env:Path" |
203 | 243 | vp env doctor |
204 | 244 | vp env run --node 24 -- node -p "process.versions" |
| 245 | +
|
| 246 | + - name: Test global package install |
| 247 | + shell: pwsh |
| 248 | + run: | |
| 249 | + $env:Path = "$env:USERPROFILE\.vite-plus\bin;$env:Path" |
| 250 | +
|
| 251 | + # Test 1: Install a JS-based CLI (typescript) |
| 252 | + npm install -g typescript |
| 253 | + tsc --version |
| 254 | +
|
| 255 | + # Test 2: Verify the package was installed correctly |
| 256 | + Get-ChildItem "$env:USERPROFILE\.vite-plus\packages\typescript\" |
| 257 | + Get-ChildItem "$env:USERPROFILE\.vite-plus\bin\" |
| 258 | +
|
| 259 | + # Test 3: Uninstall |
| 260 | + npm uninstall -g typescript |
| 261 | +
|
| 262 | + # Test 4: Verify uninstall removed shim |
| 263 | + Write-Host "Checking bin dir after uninstall:" |
| 264 | + Get-ChildItem "$env:USERPROFILE\.vite-plus\bin\" |
| 265 | + $shimPath = "$env:USERPROFILE\.vite-plus\bin\tsc.cmd" |
| 266 | + if (Test-Path $shimPath) { |
| 267 | + Write-Error "tsc shim file still exists at $shimPath" |
| 268 | + exit 1 |
| 269 | + } |
| 270 | + Write-Host "tsc shim removed successfully" |
0 commit comments