mirror of
https://github.com/prefix-dev/setup-pixi
synced 2026-10-06 10:01:54 +03:00
1378 lines
45 KiB
YAML
1378 lines
45 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
merge_group:
|
|
|
|
# Automatically stop old builds on the same branch/PR
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
default:
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- ubuntu-24.04-arm
|
|
- ubuntu-24.04-riscv
|
|
- macos-latest
|
|
- windows-latest
|
|
- windows-11-arm
|
|
cache: [true, false]
|
|
runs-on: ${{ matrix.os }}
|
|
name: default ${{ matrix.cache == true && 'with' || 'without' }} cache (${{ matrix.os }})
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
# check the action logs to see if the cache was used or not
|
|
with:
|
|
cache: ${{ matrix.cache }}
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/default/bin/python
|
|
./.pixi/envs/default/bin/python --version | grep -q 3.14
|
|
shell: bash
|
|
if: "!startsWith(matrix.os, 'windows')"
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/default/python.exe
|
|
./.pixi/envs/default/python.exe --version | grep -q 3.14
|
|
shell: bash
|
|
if: startsWith(matrix.os, 'windows')
|
|
- run: |
|
|
pixi run python --version | grep -q 3.14
|
|
pixi run test | grep -q "Hello world"
|
|
|
|
global-environments:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
global-environments: |
|
|
cowpy
|
|
- run: |
|
|
cowpy hello world
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f ${{ matrix.os == 'windows-latest' && './.pixi/envs/default/python.exe' || './.pixi/envs/default/bin/python' }}
|
|
${{ matrix.os == 'windows-latest' && './.pixi/envs/default/python.exe' || './.pixi/envs/default/bin/python' }} --version | grep -q 3.14
|
|
shell: bash
|
|
- run: |
|
|
pixi run python --version | grep -q 3.14
|
|
pixi run test | grep -q "Hello world"
|
|
|
|
global-environments-with-project-install:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
run-install: false
|
|
global-environments: |
|
|
cowpy
|
|
keyring --with keyrings.google-artifactregistry-auth
|
|
- run: |
|
|
set -o pipefail
|
|
cowpy hello world
|
|
keyring --list-backends | grep "keyrings.gauth.GooglePythonAuth"
|
|
shell: bash
|
|
if: matrix.os != 'windows-latest'
|
|
- run: |
|
|
cowpy hello world
|
|
keyring --list-backends | findstr "keyrings.gauth.GooglePythonAuth"
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
no-run-install:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
run-install: false
|
|
cache: false
|
|
- run: |
|
|
! test -d .pixi
|
|
shell: bash
|
|
|
|
no-pixi-toml:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
run-install: false
|
|
- run: |
|
|
! test -d .pixi
|
|
shell: bash
|
|
- run: pixi info
|
|
|
|
custom-pixi-version:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/old-pixi-lockfiles/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
pixi-version: v0.1.0
|
|
# pixi 0.1.0 doesn't support --locked
|
|
locked: false
|
|
- run: pixi --version | grep -q "pixi 0.1.0"
|
|
|
|
old-lockfile:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
locked: [true, false]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/old-pixi-lockfiles/* .
|
|
- uses: ./
|
|
with:
|
|
pixi-version: latest
|
|
cache: false
|
|
locked: ${{ matrix.locked }}
|
|
- if: matrix.os == 'windows-latest'
|
|
run: choco install yq
|
|
# assert that the lockfile wasn't updated
|
|
- run: test "$(yq '.version' pixi.lock)" = 1
|
|
|
|
install-path:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
run-install: false
|
|
- run: test "$(which pixi)" = "$HOME/.pixi/bin/pixi"
|
|
shell: bash
|
|
|
|
global-install:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
run-install: false
|
|
- run: pixi global install cowpy
|
|
- run: |
|
|
pixi global list 2>&1 | grep cowpy
|
|
cowpy hello world
|
|
test "$(which cowpy)" = "$HOME/.pixi/bin/cowpy"
|
|
if: matrix.os != 'windows-latest'
|
|
- run: cowpy hello world
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
frozen:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
frozen: true
|
|
- run: pixi run python --version | grep -q 3.14
|
|
|
|
locked:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
locked: true
|
|
- run: pixi run python --version | grep -q 3.14
|
|
|
|
custom-pixi-url:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/old-pixi-lockfiles/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
pixi-url: https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-unknown-linux-musl
|
|
- run: pixi --version | grep -q "pixi 0.14.0"
|
|
|
|
pixi-url-headers-bearer:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/old-pixi-lockfiles/* .
|
|
- name: Setup caddy
|
|
run: |
|
|
set -euo pipefail
|
|
curl -Ls -o caddy.tar.gz https://github.com/caddyserver/caddy/releases/download/v2.10.0/caddy_2.10.0_linux_amd64.tar.gz
|
|
tar -xzf caddy.tar.gz
|
|
chmod +x caddy
|
|
|
|
mkdir -p assets
|
|
curl -Ls -o assets/pixi https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-unknown-linux-musl
|
|
|
|
cp .github/assets/pixi-url-auth-test/Caddyfile .
|
|
|
|
./caddy run --config Caddyfile &
|
|
- run: ps -aux | grep caddy
|
|
- name: Run with wrong token
|
|
uses: ./
|
|
id: wrongtoken
|
|
with:
|
|
cache: false
|
|
pixi-url: http://localhost:8080/pixi
|
|
pixi-url-headers: '{"Authorization": "Bearer wrongtoken"}'
|
|
continue-on-error: true
|
|
- name: Fail if wrong token did not fail
|
|
run: |
|
|
echo "Unexpected success!"
|
|
exit 1
|
|
if: ${{ steps.wrongtoken.outcome != 'failure' }}
|
|
- name: Run with correct token
|
|
uses: ./
|
|
with:
|
|
cache: false
|
|
pixi-url: http://localhost:8080/pixi
|
|
pixi-url-headers: '{"Authorization": "Bearer s3cr3tT0k3nABC123"}'
|
|
- run: pixi --version | grep -q "pixi 0.14.0"
|
|
|
|
pixi-url-custom-template-no-version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
pixi-url: |
|
|
{{#if latest ~}}
|
|
https://github.com/prefix-dev/pixi/releases/download/v0.14.0/{{pixiFile}}
|
|
{{~else~}}
|
|
https://github.com/prefix-dev/pixi/releases/download/{{version}}/{{pixiFile}}
|
|
{{~/if}}
|
|
run-install: false
|
|
- run: pixi --version | grep -q "pixi 0.14.0"
|
|
|
|
pixi-url-custom-template-version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
pixi-url: |
|
|
{{#if latest ~}}
|
|
https://github.com/prefix-dev/pixi/releases/download/v0.14.0/{{pixiFile}}
|
|
{{~else~}}
|
|
https://github.com/prefix-dev/pixi/releases/download/{{version}}/{{pixiFile}}
|
|
{{~/if}}
|
|
run-install: false
|
|
pixi-version: v0.15.1
|
|
- run: pixi --version | grep -q "pixi 0.15.1"
|
|
|
|
pixi-url-custom-template-version-latest:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
pixi-url: |
|
|
{{#if latest ~}}
|
|
https://github.com/prefix-dev/pixi/releases/download/v0.14.0/{{pixiFile}}
|
|
{{~else~}}
|
|
https://github.com/prefix-dev/pixi/releases/download/{{version}}/{{pixiFile}}
|
|
{{~/if}}
|
|
run-install: false
|
|
pixi-version: latest
|
|
- run: pixi --version | grep -q "pixi 0.14.0"
|
|
|
|
working-directory:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
working-directory: test/default
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/default/bin/python
|
|
.pixi/envs/default/bin/python --version | grep -q 3.14
|
|
shell: bash
|
|
working-directory: test/default
|
|
if: matrix.os != 'windows-latest'
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/default/python.exe
|
|
.pixi/envs/default/python.exe --version | grep -q 3.14
|
|
shell: bash
|
|
working-directory: test/default
|
|
if: matrix.os == 'windows-latest'
|
|
- run: pixi run python --version | grep -q 3.14
|
|
working-directory: test/default
|
|
|
|
working-directory-with-manifest-path:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
working-directory: test
|
|
manifest-path: default/pixi.toml
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/default/bin/python
|
|
shell: bash
|
|
working-directory: test/default
|
|
if: matrix.os != 'windows-latest'
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/default/python.exe
|
|
shell: bash
|
|
working-directory: test/default
|
|
if: matrix.os == 'windows-latest'
|
|
- run: pixi run python --version | grep -q 3.14
|
|
working-directory: test/default
|
|
|
|
working-directory-with-absolute-manifest-path:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
working-directory: test/default
|
|
manifest-path: ${{ github.workspace }}/test/default/pixi.toml
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/default/bin/python
|
|
shell: bash
|
|
working-directory: test/default
|
|
if: matrix.os != 'windows-latest'
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/default/python.exe
|
|
shell: bash
|
|
working-directory: test/default
|
|
if: matrix.os == 'windows-latest'
|
|
- run: pixi run python --version | grep -q 3.14
|
|
working-directory: test/default
|
|
|
|
custom-manifest-path:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest, windows-11-arm]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
manifest-path: test/bzip2/pixi.toml
|
|
|
|
different-log-level:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
log-level: v
|
|
|
|
custom-bin-path:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
pixi-bin-path: custom-bin/pixi${{ matrix.os == 'windows-latest' && '.exe' || '' }}
|
|
- run: |
|
|
test -f custom-bin/pixi${{ matrix.os == 'windows-latest' && '.exe' || '' }}
|
|
pixi --help
|
|
which pixi | grep -q custom-bin/pixi
|
|
# which pixi should be absolute
|
|
which pixi | grep -q "^/"
|
|
|
|
existing-pixi-bin:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
ignore-reason: [none, version, version-latest, url, bin-path]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- name: Create pixi directory and add to PATH
|
|
run: |
|
|
mkdir -p "$HOME/custom existing pixi"
|
|
echo "$HOME/custom existing pixi" >> $GITHUB_PATH
|
|
if: matrix.os != 'windows-latest'
|
|
- name: Create pixi directory and add to PATH (Windows)
|
|
run: |
|
|
mkdir "$env:USERPROFILE\custom existing pixi"
|
|
echo "$env:USERPROFILE\custom existing pixi" >> $env:GITHUB_PATH
|
|
shell: pwsh
|
|
if: matrix.os == 'windows-latest'
|
|
- name: Download pixi binary (Ubuntu)
|
|
run: |
|
|
set -o pipefail
|
|
curl -L --output "$HOME/custom existing pixi/pixi" https://github.com/prefix-dev/pixi/releases/download/v0.76.0/pixi-x86_64-unknown-linux-musl
|
|
chmod +x "$HOME/custom existing pixi/pixi"
|
|
if: matrix.os == 'ubuntu-latest'
|
|
- name: Download pixi binary (macOS)
|
|
run: |
|
|
set -o pipefail
|
|
curl -L --output "$HOME/custom existing pixi/pixi" https://github.com/prefix-dev/pixi/releases/download/v0.76.0/pixi-x86_64-apple-darwin
|
|
chmod +x "$HOME/custom existing pixi/pixi"
|
|
if: matrix.os == 'macos-latest'
|
|
- name: Download pixi binary (Windows)
|
|
run: |
|
|
curl -L --output "$HOME/custom existing pixi/pixi.exe" https://github.com/prefix-dev/pixi/releases/download/v0.76.0/pixi-x86_64-pc-windows-msvc.exe
|
|
if: matrix.os == 'windows-latest'
|
|
- run: |
|
|
echo "Path: $PATH"
|
|
shell: bash
|
|
- name: Verify pixi version (before setup-pixi)
|
|
run: |
|
|
pixi --version
|
|
pixi --version | grep -q "pixi 0.76.0"
|
|
shell: bash
|
|
- name: Verify pixi path (before setup-pixi)
|
|
run: |
|
|
which pixi | grep -q "$HOME/custom existing pixi/pixi"
|
|
shell: bash
|
|
- name: Run Action (should use preinstalled pixi)
|
|
uses: ./
|
|
with:
|
|
cache: false
|
|
if: matrix.ignore-reason == 'none'
|
|
- name: Run Action (version-latest should overwrite preinstalled pixi)
|
|
uses: ./
|
|
with:
|
|
cache: false
|
|
pixi-version: latest
|
|
if: matrix.ignore-reason == 'version-latest'
|
|
- name: Run Action (version should overwrite preinstalled pixi)
|
|
uses: ./
|
|
with:
|
|
cache: false
|
|
pixi-version: v0.77.0
|
|
if: matrix.ignore-reason == 'version'
|
|
- name: Run Action (url should overwrite preinstalled pixi)
|
|
uses: ./
|
|
with:
|
|
cache: false
|
|
pixi-url: |
|
|
${{
|
|
matrix.os == 'ubuntu-latest' &&
|
|
'https://github.com/prefix-dev/pixi/releases/download/v0.77.0/pixi-x86_64-unknown-linux-musl'
|
|
|| matrix.os == 'macos-latest' &&
|
|
'https://github.com/prefix-dev/pixi/releases/download/v0.77.0/pixi-x86_64-apple-darwin'
|
|
|| 'https://github.com/prefix-dev/pixi/releases/download/v0.77.0/pixi-x86_64-pc-windows-msvc.exe'
|
|
}}
|
|
if: matrix.ignore-reason == 'url'
|
|
- name: Create custom bin directory
|
|
run: mkdir custom-bin
|
|
shell: bash
|
|
if: matrix.ignore-reason == 'bin-path'
|
|
- name: Run Action (pixi-bin-path should overwrite preinstalled pixi)
|
|
uses: ./
|
|
with:
|
|
cache: false
|
|
# this will implicitly set pixi-version to latest
|
|
pixi-bin-path: custom-bin/pixi${{ matrix.os == 'windows-latest' && '.exe' || '' }}
|
|
if: matrix.ignore-reason == 'bin-path'
|
|
- name: Verify pixi version (after setup-pixi) - still at 0.76.0
|
|
run: |
|
|
pixi --version
|
|
pixi --version | grep -q 0.76.0
|
|
shell: bash
|
|
if: matrix.ignore-reason == 'none'
|
|
- name: Verify pixi version (after setup-pixi) - should be 0.77.0
|
|
run: |
|
|
pixi --version
|
|
pixi --version | grep -q 0.77.0
|
|
shell: bash
|
|
if: matrix.ignore-reason != 'none' && matrix.ignore-reason != 'bin-path' && matrix.ignore-reason != 'version-latest'
|
|
- name: Verify pixi version (after setup-pixi) - should be latest
|
|
run: |
|
|
pixi --version
|
|
pixi --version | grep -vq 0.76.0
|
|
pixi --version | grep -vq 0.77.0
|
|
shell: bash
|
|
if: matrix.ignore-reason == 'bin-path' || matrix.ignore-reason == 'version-latest'
|
|
- name: Verify pixi path (after setup-pixi, no ignore reason)
|
|
run: |
|
|
which pixi | grep -q "$HOME/custom existing pixi/pixi"
|
|
shell: bash
|
|
if: matrix.ignore-reason == 'none'
|
|
- name: Verify pixi path (after setup-pixi, ignore reason)
|
|
run: |
|
|
which pixi | grep -vq "$HOME/custom existing pixi/pixi"
|
|
shell: bash
|
|
if: matrix.ignore-reason != 'none'
|
|
|
|
auth-token:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
auth-host: https://custom-conda-registry.com
|
|
auth-token: custom-token
|
|
- run: |
|
|
cat ~/.rattler/credentials.json
|
|
[ $(jq '."*.custom-conda-registry.com".BearerToken' -r ~/.rattler/credentials.json) = "custom-token" ]
|
|
# all other platforms have the credentials stored in the keychain
|
|
# https://github.com/prefix-dev/pixi/issues/330
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
auth-username-password:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
auth-host: https://custom-conda-registry.com
|
|
auth-username: custom-username
|
|
auth-password: custom-password
|
|
- run: |
|
|
cat ~/.rattler/credentials.json
|
|
[ $(jq '."*.custom-conda-registry.com".BasicHTTP.username' -r ~/.rattler/credentials.json) = "custom-username" ]
|
|
[ $(jq '."*.custom-conda-registry.com".BasicHTTP.password' -r ~/.rattler/credentials.json) = "custom-password" ]
|
|
# all other platforms have the credentials stored in the keychain
|
|
# https://github.com/prefix-dev/pixi/issues/330
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
auth-conda-token:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
auth-host: https://custom-conda-registry.com
|
|
auth-conda-token: custom-conda-token
|
|
- run: |
|
|
cat ~/.rattler/credentials.json
|
|
[ $(jq '."*.custom-conda-registry.com".CondaToken' -r ~/.rattler/credentials.json) = "custom-conda-token" ]
|
|
# all other platforms have the credentials stored in the keychain
|
|
# https://github.com/prefix-dev/pixi/issues/330
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
persist-credentials-false:
|
|
env:
|
|
# We must set this environment variable explicitly to force all
|
|
# operating systems to use the same storage mechanism.
|
|
# Otherwise, windows and mac will use the keychain, which is more cumbersome to test.
|
|
RATTLER_AUTH_FILE: .rattler-credentials.json
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
# Sanity check: Login with default persist-credentials behavior
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
auth-host: https://custom-conda-registry.com
|
|
auth-token: custom-token
|
|
- name: Assert that the credentials are stored
|
|
run: |
|
|
# For human log readers
|
|
cat "${RATTLER_AUTH_FILE}"
|
|
# Actual test
|
|
[ $(jq '."*.custom-conda-registry.com".BearerToken' -r "${RATTLER_AUTH_FILE}") = "custom-token" ]
|
|
- name: Clean up credentials file
|
|
run: rm "${RATTLER_AUTH_FILE}"
|
|
# Actual test: Login with persist-credentials: false
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
auth-host: https://custom-conda-registry.com
|
|
auth-token: custom-token
|
|
persist-credentials: false
|
|
- name: Assert that the credentials are not stored anymore
|
|
run: |
|
|
# For human log readers
|
|
cat "${RATTLER_AUTH_FILE}"
|
|
|
|
# Actual test
|
|
! grep -q '"*.custom-conda-registry.com"' "${RATTLER_AUTH_FILE}"
|
|
|
|
auth-token-install:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/auth/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
auth-host: https://repo.prefix.dev
|
|
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
|
|
- name: Ensure private-package is installed
|
|
run: |
|
|
test -f .pixi/envs/default/conda-meta/private-package-0.0.1-0.json
|
|
|
|
auth-s3-install:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/auth-s3/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
auth-host: s3://rattler-s3-testing
|
|
auth-s3-access-key-id: ${{ secrets.PIXI_TEST_R2_ACCESS_KEY_ID }}
|
|
auth-s3-secret-access-key: ${{ secrets.PIXI_TEST_R2_SECRET_ACCESS_KEY }}
|
|
- name: Ensure private package is installed
|
|
run: |
|
|
test -f .pixi/envs/default/conda-meta/my-webserver-0.1.0-pyh4616a5c_0.json
|
|
|
|
pixi-shell:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest, windows-11-arm]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
- run: |
|
|
python --version | grep -q "3.14"
|
|
shell: pixi run bash -e {0}
|
|
- run: |
|
|
import sys
|
|
print(sys.version)
|
|
print("Hello world")
|
|
shell: pixi run python {0}
|
|
- run: |
|
|
python --version | Select-String "3.14"
|
|
shell: pixi run pwsh -Command {0}
|
|
# TODO investigate: for some reason, this errors on ubuntu-arm
|
|
if: matrix.os != 'ubuntu-24.04-arm'
|
|
|
|
pixi-shell-exec:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest, windows-11-arm]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
run-install: false
|
|
- run: |
|
|
python --version | grep -q "3.14"
|
|
shell: pixi exec --spec python=3.14.* -- bash -e {0}
|
|
- run: |
|
|
import ruamel.yaml
|
|
shell: pixi exec --spec python --spec ruamel.yaml -- python {0}
|
|
- run: |
|
|
python --version | Select-String "3.14"
|
|
shell: pixi exec --spec python=3.14.* -- pwsh -Command {0}
|
|
# TODO investigate: for some reason, this errors on ubuntu-arm
|
|
if: matrix.os != 'ubuntu-24.04-arm'
|
|
|
|
post-cleanup-linux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
post-cleanup: ['true', 'false']
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: lisanna-dettwyler/action-post-run@d053b9b43d788b87a409f6cdb3b6fc87c6c8a4fe # v3.1.0
|
|
with:
|
|
run: |
|
|
set -euxo pipefail
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -d .pixi
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -d ~/.rattler
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -d ~/.cache/rattler
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -f ~/.pixi/bin/pixi
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
post-cleanup: ${{ matrix.post-cleanup }}
|
|
# ~/.rattler is only created if the user has logged in
|
|
auth-host: https://custom-conda-registry.com
|
|
auth-token: custom-token
|
|
|
|
post-cleanup-linux-no-login:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
post-cleanup: ['true', 'false']
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: lisanna-dettwyler/action-post-run@d053b9b43d788b87a409f6cdb3b6fc87c6c8a4fe # v3.1.0
|
|
with:
|
|
run: |
|
|
set -euxo pipefail
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -d .pixi
|
|
! test -d ~/.rattler
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -d ~/.cache/rattler
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -f ~/.pixi/bin/pixi
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
post-cleanup: ${{ matrix.post-cleanup }}
|
|
|
|
post-cleanup-macos:
|
|
runs-on: macos-latest
|
|
strategy:
|
|
matrix:
|
|
post-cleanup: ['true', 'false']
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: lisanna-dettwyler/action-post-run@d053b9b43d788b87a409f6cdb3b6fc87c6c8a4fe # v3.1.0
|
|
with:
|
|
run: |
|
|
set -euxo pipefail
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -d .pixi
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -d ~/Library/Caches/rattler
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -f ~/.pixi/bin/pixi
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
post-cleanup: ${{ matrix.post-cleanup }}
|
|
|
|
post-cleanup-windows:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
post-cleanup: ['true', 'false']
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: lisanna-dettwyler/action-post-run@d053b9b43d788b87a409f6cdb3b6fc87c6c8a4fe # v3.1.0
|
|
with:
|
|
run: |
|
|
set -euxo pipefail
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -d .pixi
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -d "$LOCALAPPDATA/rattler"
|
|
${{ matrix.post-cleanup == 'true' && '! ' || '' }}test -f ~/.pixi/bin/pixi
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
post-cleanup: ${{ matrix.post-cleanup }}
|
|
|
|
no-lockfile:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/no-lockfile/* .
|
|
- uses: ./
|
|
with:
|
|
cache: false
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/default/bin/python
|
|
./.pixi/envs/default/bin/python --version | grep -q 3.11
|
|
shell: bash
|
|
if: matrix.os != 'windows-latest'
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/default/python.exe
|
|
./.pixi/envs/default/python.exe --version | grep -q 3.11
|
|
shell: bash
|
|
if: matrix.os == 'windows-latest'
|
|
- run: |
|
|
pixi run python --version | grep -q 3.11
|
|
pixi run test | grep -q "Hello world"
|
|
|
|
multiple-environments:
|
|
name: multiple-environments (${{ matrix.os }}, cache=${{ matrix.cache }})
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
cache: ['true', 'false']
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/multiple-environments/* .
|
|
- uses: ./
|
|
with:
|
|
environments: py311 py312
|
|
cache: ${{ matrix.cache }}
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/py311/bin/python
|
|
test -f .pixi/envs/py312/bin/python
|
|
! test -d .pixi/envs/default
|
|
./.pixi/envs/py311/bin/python --version | grep -q 3.11
|
|
./.pixi/envs/py312/bin/python --version | grep -q 3.12
|
|
shell: bash
|
|
if: matrix.os != 'windows-latest'
|
|
- run: |
|
|
set -o pipefail
|
|
pixi info
|
|
test -f .pixi/envs/py311/python.exe
|
|
test -f .pixi/envs/py312/python.exe
|
|
! test -d .pixi/envs/default
|
|
./.pixi/envs/py311/python.exe --version | grep -q 3.11
|
|
./.pixi/envs/py312/python.exe --version | grep -q 3.12
|
|
shell: bash
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
cache-write-true:
|
|
timeout-minutes: 10
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache-write: true
|
|
|
|
test-cache1:
|
|
name: Test cache 1/2
|
|
timeout-minutes: 10
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache: true
|
|
cache-key: test-cache-${{ github.sha }}-${{ github.run_attempt }}-
|
|
# check the action logs to see if the cache was written
|
|
- run: |
|
|
test -f .pixi/envs/default/bin/python
|
|
if: matrix.os != 'windows-latest'
|
|
- run: |
|
|
test -f .pixi/envs/default/python.exe
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
test-cache2:
|
|
name: Test cache 2/2
|
|
timeout-minutes: 10
|
|
needs: test-cache1
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache: true
|
|
cache-key: test-cache-${{ github.sha }}-${{ github.run_attempt }}-
|
|
# check the action logs to see if the cache was restored
|
|
- run: |
|
|
test -f .pixi/envs/default/bin/python
|
|
if: matrix.os != 'windows-latest'
|
|
- run: |
|
|
test -f .pixi/envs/default/python.exe
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
test-cache-no-write:
|
|
name: Test cache no write
|
|
timeout-minutes: 10
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
cache: true
|
|
cache-write: false
|
|
cache-key: test-cache-${{ github.sha }}-${{ github.run_attempt }}-
|
|
# check the action logs to see if the cache write was skipped
|
|
|
|
pyproject:
|
|
timeout-minutes: 10
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/pyproject-manifest/* .
|
|
- uses: ./
|
|
- run: test -f .pixi/envs/default/bin/python
|
|
if: matrix.os != 'windows-latest'
|
|
shell: bash
|
|
- run: test -f .pixi/envs/default/python.exe
|
|
if: matrix.os == 'windows-latest'
|
|
shell: bash
|
|
- run: pixi run test
|
|
|
|
custom-pyproject-manifest-path:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: ./
|
|
with:
|
|
cache: true
|
|
manifest-path: test/pyproject-manifest/pyproject.toml
|
|
|
|
environment-activation-unix:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
activate-environment: true
|
|
- run: which python | grep '.pixi/envs/default/bin/python'
|
|
- run: env | grep CONDA_PREFIX
|
|
- run: '[[ $PIXI_ENVIRONMENT_NAME = "default" ]]'
|
|
|
|
environment-activation-windows-bash:
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
activate-environment: true
|
|
- run: which python | grep '.pixi/envs/default/python'
|
|
- run: env | grep CONDA_PREFIX
|
|
- run: '[[ $PIXI_ENVIRONMENT_NAME = "default" ]]'
|
|
|
|
environment-activation-windows-pwsh:
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
shell: pwsh
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
activate-environment: true
|
|
- run: if (-Not (Get-Command python).Path -like '*\.pixi\envs\default\python') { exit 1 }
|
|
- run: if (!$env:CONDA_PREFIX) { exit 1 }
|
|
- run: if ($env:PIXI_ENVIRONMENT_NAME -ne "default") { exit 1 }
|
|
|
|
environment-activation-windows-cmd:
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
shell: cmd
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
activate-environment: true
|
|
- run: where python | findstr "\.pixi\\envs\\default\\python.exe"
|
|
- run: set | findstr CONDA_PREFIX
|
|
- run: |
|
|
if defined PIXI_ENVIRONMENT_NAME (
|
|
if "%PIXI_ENVIRONMENT_NAME%" NEQ "default" (
|
|
exit 1
|
|
)
|
|
)
|
|
|
|
environment-activation-false:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
with:
|
|
activate-environment: false
|
|
- run: '[[ $PIXI_ENVIRONMENT_NAME = "" ]]'
|
|
|
|
environment-activation-explicit-env:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/multiple-environments/* .
|
|
- uses: ./
|
|
with:
|
|
environments: py311
|
|
activate-environment: true
|
|
- run: which python | grep '.pixi/envs/py311/bin/python'
|
|
- run: '[[ $PIXI_ENVIRONMENT_NAME = "py311" ]]'
|
|
|
|
environment-activation-multiple-env:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/multiple-environments/* .
|
|
- uses: ./
|
|
with:
|
|
environments: >-
|
|
py311 py312
|
|
activate-environment: py311
|
|
- run: which python | grep '.pixi/envs/py311/bin/python'
|
|
- run: '[[ $PIXI_ENVIRONMENT_NAME = "py311" ]]'
|
|
|
|
multiple-invokations:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/multiple-environments/* .
|
|
- uses: ./
|
|
with:
|
|
run-install: false
|
|
- uses: ./
|
|
with:
|
|
environments: >-
|
|
py311 py312
|
|
activate-environment: py311
|
|
|
|
env-variable-input-custom-bin-path:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
env:
|
|
SETUP_PIXI_PIXI_BIN_PATH: custom-bin/pixi${{ matrix.os == 'windows-latest' && '.exe' || '' }}
|
|
with:
|
|
cache: false
|
|
- run: |
|
|
test -f custom-bin/pixi${{ matrix.os == 'windows-latest' && '.exe' || '' }}
|
|
pixi --help
|
|
which pixi | grep -q custom-bin/pixi
|
|
# which pixi should be absolute
|
|
which pixi | grep -q "^/"
|
|
|
|
env-variable-input-custom-pixi-url:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/old-pixi-lockfiles/* .
|
|
- uses: ./
|
|
env:
|
|
SETUP_PIXI_PIXI_URL: https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-unknown-linux-musl
|
|
with:
|
|
cache: false
|
|
- run: pixi --version | grep -q "pixi 0.14.0"
|
|
|
|
env-variable-input-precendence:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi.toml
|
|
run: mv test/old-pixi-lockfiles/* .
|
|
- uses: ./
|
|
env:
|
|
SETUP_PIXI_PIXI_URL: https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-unknown-linux-musl
|
|
with:
|
|
cache: false
|
|
pixi-url: https://github.com/prefix-dev/pixi/releases/download/v0.49.0/pixi-x86_64-unknown-linux-musl
|
|
- run: pixi --version | grep -q "pixi 0.49.0"
|
|
|
|
test-cache-fail-no-lockfile:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/no-lockfile/* .
|
|
- uses: ./
|
|
id: test
|
|
with:
|
|
cache: true
|
|
cache-key: test-cache-no-lockfile-${{ github.sha }}-${{ github.run_attempt }}-
|
|
continue-on-error: true
|
|
- name: Fail on unexpected success
|
|
run: |
|
|
echo "Unexpected success!"
|
|
exit 1
|
|
if: ${{ steps.test.outcome != 'failure' }}
|
|
|
|
test-incorrect-version:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
id: test
|
|
with:
|
|
pixi-version: 0.1.0
|
|
continue-on-error: true
|
|
- name: Fail on unexpected success
|
|
run: |
|
|
echo "Unexpected success!"
|
|
exit 1
|
|
if: ${{ steps.test.outcome != 'failure' }}
|
|
|
|
test-frozen-and-locked:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/default/* .
|
|
- uses: ./
|
|
id: test
|
|
with:
|
|
pixi-version: v0.5.0
|
|
frozen: true
|
|
locked: true
|
|
continue-on-error: true
|
|
- name: Fail on unexpected success
|
|
run: |
|
|
echo "Unexpected success!"
|
|
exit 1
|
|
if: ${{ steps.test.outcome != 'failure' }}
|
|
|
|
test-frozen-no-lockfile:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/no-lockfile/* .
|
|
- uses: ./
|
|
id: test
|
|
with:
|
|
frozen: true
|
|
continue-on-error: true
|
|
- name: Fail on unexpected success
|
|
run: |
|
|
echo "Unexpected success!"
|
|
exit 1
|
|
if: ${{ steps.test.outcome != 'failure' }}
|
|
|
|
test-locked-no-lockfile:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/no-lockfile/* .
|
|
- uses: ./
|
|
id: test
|
|
with:
|
|
locked: true
|
|
continue-on-error: true
|
|
- name: Fail on unexpected success
|
|
run: |
|
|
echo "Unexpected success!"
|
|
exit 1
|
|
if: ${{ steps.test.outcome != 'failure' }}
|
|
|
|
test-lockfile-not-up-to-date:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/lockfile-not-up-to-date/* .
|
|
- uses: ./
|
|
id: test
|
|
# locked: true is implicit
|
|
continue-on-error: true
|
|
- name: Fail on unexpected success
|
|
run: |
|
|
echo "Unexpected success!"
|
|
exit 1
|
|
if: ${{ steps.test.outcome != 'failure' }}
|
|
|
|
cache-write-true-no-lockfile:
|
|
timeout-minutes: 10
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Move pixi files
|
|
run: mv test/no-lockfile/* .
|
|
- uses: ./
|
|
id: test
|
|
with:
|
|
cache-write: true
|
|
continue-on-error: true
|
|
- name: Fail on unexpected success
|
|
run: |
|
|
echo "Unexpected success!"
|
|
exit 1
|
|
if: ${{ steps.test.outcome != 'failure' }}
|