@@ -195,7 +195,7 @@ jobs:
195
195
with :
196
196
cache : false
197
197
manifest-path : test/default/pixi.toml
198
-
198
+
199
199
different-log-level :
200
200
strategy :
201
201
matrix :
@@ -230,6 +230,126 @@ jobs:
230
230
# which pixi should be absolute
231
231
which pixi | grep -q "^/"
232
232
233
+ existing-pixi-bin :
234
+ strategy :
235
+ matrix :
236
+ os : [ubuntu-latest, macos-latest, windows-latest]
237
+ ignore-reason : [ none, version, version-latest, url, bin-path]
238
+ runs-on : ${{ matrix.os }}
239
+ steps :
240
+ - uses : actions/checkout@v4
241
+ - name : Move pixi.toml
242
+ run : mv test/default/* .
243
+ - name : Create pixi directory and add to PATH
244
+ run : |
245
+ mkdir -p $HOME/custom-existing-pixi
246
+ echo $HOME/custom-existing-pixi >> $GITHUB_PATH
247
+ if : matrix.os != 'windows-latest'
248
+ - name : Create pixi directory and add to PATH (Windows)
249
+ run : |
250
+ mkdir $env:USERPROFILE\custom-existing-pixi
251
+ echo $env:USERPROFILE\custom-existing-pixi >> $env:GITHUB_PATH
252
+ shell : pwsh
253
+ if : matrix.os == 'windows-latest'
254
+ - name : Download pixi binary (Ubuntu)
255
+ run : |
256
+ set -o pipefail
257
+ curl -L --output $HOME/custom-existing-pixi/pixi https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-unknown-linux-musl
258
+ chmod +x $HOME/custom-existing-pixi/pixi
259
+ if : matrix.os == 'ubuntu-latest'
260
+ - name : Download pixi binary (macOS)
261
+ run : |
262
+ set -o pipefail
263
+ curl -L --output $HOME/custom-existing-pixi/pixi https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-apple-darwin
264
+ chmod +x $HOME/custom-existing-pixi/pixi
265
+ if : matrix.os == 'macos-latest'
266
+ - name : Download pixi binary (Windows)
267
+ run : |
268
+ curl -L --output $HOME/custom-existing-pixi/pixi.exe https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-pc-windows-msvc.exe
269
+ if : matrix.os == 'windows-latest'
270
+ - run : |
271
+ echo "Path: $PATH"
272
+ shell: bash
273
+ - name : Verify pixi version (before setup-pixi)
274
+ run : |
275
+ pixi --version
276
+ pixi --version | grep -q "pixi 0.14.0"
277
+ shell : bash
278
+ - name : Verify pixi path (before setup-pixi)
279
+ run : |
280
+ which pixi | grep -q $HOME/custom-existing-pixi/pixi
281
+ shell : bash
282
+ - name : Run Action (should use preinstalled pixi)
283
+ uses : ./
284
+ with :
285
+ cache : false
286
+ if : matrix.ignore-reason == 'none'
287
+ - name : Run Action (version-latest should overwrite preinstalled pixi)
288
+ uses : ./
289
+ with :
290
+ cache : false
291
+ pixi-version : latest
292
+ if : matrix.ignore-reason == 'version-latest'
293
+ - name : Run Action (version should overwrite preinstalled pixi)
294
+ uses : ./
295
+ with :
296
+ cache : false
297
+ pixi-version : v0.16.0
298
+ if : matrix.ignore-reason == 'version'
299
+ - name : Run Action (url should overwrite preinstalled pixi)
300
+ uses : ./
301
+ with :
302
+ cache : false
303
+ pixi-url : |
304
+ ${{
305
+ matrix.os == 'ubuntu-latest' &&
306
+ 'https://github.com/prefix-dev/pixi/releases/download/v0.16.0/pixi-x86_64-unknown-linux-musl'
307
+ || matrix.os == 'macos-latest' &&
308
+ 'https://github.com/prefix-dev/pixi/releases/download/v0.16.0/pixi-x86_64-apple-darwin'
309
+ || 'https://github.com/prefix-dev/pixi/releases/download/v0.16.0/pixi-x86_64-pc-windows-msvc.exe'
310
+ }}
311
+ if : matrix.ignore-reason == 'url'
312
+ - name : Create custom bin directory
313
+ run : mkdir custom-bin
314
+ shell : bash
315
+ if : matrix.ignore-reason == 'bin-path'
316
+ - name : Run Action (pixi-bin-path should overwrite preinstalled pixi)
317
+ uses : ./
318
+ with :
319
+ cache : false
320
+ # this will implicitly set pixi-version to latest
321
+ pixi-bin-path : custom-bin/pixi${{ matrix.os == 'windows-latest' && '.exe' || '' }}
322
+ if : matrix.ignore-reason == 'bin-path'
323
+ - name : Verify pixi version (after setup-pixi) - still at 0.14.0
324
+ run : |
325
+ pixi --version
326
+ pixi --version | grep -q 0.14.0
327
+ shell : bash
328
+ if : matrix.ignore-reason == 'none'
329
+ - name : Verify pixi version (after setup-pixi) - should be 0.16.0
330
+ run : |
331
+ pixi --version
332
+ pixi --version | grep -q 0.16.0
333
+ shell : bash
334
+ if : matrix.ignore-reason != 'none' && matrix.ignore-reason != 'bin-path' && matrix.ignore-reason != 'version-latest'
335
+ - name : Verify pixi version (after setup-pixi) - should be latest
336
+ run : |
337
+ pixi --version
338
+ pixi --version | grep -vq 0.14.0
339
+ pixi --version | grep -vq 0.16.0
340
+ shell : bash
341
+ if : matrix.ignore-reason == 'bin-path' || matrix.ignore-reason == 'version-latest'
342
+ - name : Verify pixi path (after setup-pixi, no ignore reason)
343
+ run : |
344
+ which pixi | grep -q $HOME/custom-existing-pixi/pixi
345
+ shell : bash
346
+ if : matrix.ignore-reason == 'none'
347
+ - name : Verify pixi path (after setup-pixi, ignore reason)
348
+ run : |
349
+ which pixi | grep -vq $HOME/custom-existing-pixi/pixi
350
+ shell : bash
351
+ if : matrix.ignore-reason != 'none'
352
+
233
353
auth-token :
234
354
strategy :
235
355
matrix :
@@ -573,7 +693,7 @@ jobs:
573
693
cache-write : false
574
694
cache-key : test-cache-${{ github.sha }}-${{ github.run_attempt }}-
575
695
# check the action logs to see if the cache write was skipped
576
-
696
+
577
697
custom-pyproject-manifest-path :
578
698
strategy :
579
699
matrix :
0 commit comments