Skip to content

Commit

Permalink
Add more tests (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw authored Jan 31, 2024
1 parent ca3b9ac commit 3f5ab78
Show file tree
Hide file tree
Showing 5 changed files with 2,356 additions and 758 deletions.
66 changes: 59 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
default:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest, macos-14]
cache: [true, false]
runs-on: ${{ matrix.os }}
name: default ${{ matrix.cache == true && 'with' || 'without' }} cache (${{ matrix.os }})
Expand Down Expand Up @@ -61,12 +61,12 @@ jobs:
custom-pixi-version:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
run: mv test/old-pixi-lockfiles/* .
- uses: ./
with:
cache: false
Expand All @@ -75,6 +75,58 @@ jobs:
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@v4
- 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, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- 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, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- 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:
Expand Down Expand Up @@ -110,7 +162,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
run: mv test/old-pixi-lockfiles/* .
- uses: ./
with:
cache: false
Expand Down Expand Up @@ -393,7 +445,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-latest, macos-latest, macos-14]
steps:
- uses: actions/checkout@v4
- name: Move pixi files
Expand All @@ -418,7 +470,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-latest, macos-latest, macos-14]
steps:
- uses: actions/checkout@v4
- name: Move pixi files
Expand All @@ -442,7 +494,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-latest, macos-latest, macos-14]
steps:
- uses: actions/checkout@v4
- name: Move pixi files
Expand Down
Loading

0 comments on commit 3f5ab78

Please sign in to comment.