Skip to content

Add tests

Add tests #2

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:
jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
- run: |
pixi info | grep -q "environment : test"
test -f .pixi/env/bin/python
./pixi/env/bin/python --version | grep -q 3.11
no-run-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
run-install: false
- run: |
! test -d .pixi
custom-pixi-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
pixi-version: 0.1.0
- run: pixi --version | grep -q "pixi 0.1.0"
custom-pixi-url:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
pixi-url: https://github.com/prefix-dev/pixi/releases/download/v0.0.8/pixi-aarch64-unknown-linux-musl
- run: pixi --version | grep -q "pixi 0.0.8"
custom-manifest-path:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
manifest-path: test/default/pixi.toml
different-log-level:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
log-level: debug
run-shell:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
generate-run-shell: true
- run: python --version | grep -q "3.11"
shell: pixi-shell {0}
custom-bin-path:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- name: Create bin directory
run: mkdir bin
- uses: ./
with:
pixi-bin-path: bin/pixi
- run: |
which pixi | grep -q "..."
auth-token:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
auth-host: TODO
auth-token: TODO
# TODO
# - run:
auth-username-password:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
auth-host: TODO
auth-username: TODO
auth-password: TODO
auth-conda-token:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
auth-host: TODO
auth-conda-token: TODO
post-cleanup:
name: post-cleanup ${{ matrix.post-cleanup }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- post-cleanup: 'none'
env-exists: ''
cache-exists: ''
pixi-dir-exists: ''
- post-cleanup: 'environment'
env-exists: '! '
cache-exists: ''
pixi-dir-exists: ''
- post-cleanup: 'all'
env-exists: '! '
cache-exists: '! '
pixi-dir-exists: '! '
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: lisanna-dettwyler/action-post-run@d053b9b43d788b87a409f6cdb3b6fc87c6c8a4fe
with:
run: |
set -euxo pipefail
${{ matrix.env-exists }}test -d .pixi
${{ matrix.cache-exists }}test -d ~/.cache/rattler
${{ matrix.pixi-dir-exists }}test -f ~/.pixi
- uses: ./
with:
post-cleanup: ${{ matrix.post-cleanup }}
no-lockfile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/no-lockfile/* .
- uses: ./
- run: |
pixi info | grep -q "environment : test-no-lockfile"
test -f .pixi/env/bin/python
./pixi/env/bin/python --version | grep -q 3.11