Skip to content

Commit

Permalink
restructuring, use if
Browse files Browse the repository at this point in the history
  • Loading branch information
ytausch committed Apr 13, 2024
1 parent 9beef03 commit b577c0e
Showing 1 changed file with 28 additions and 19 deletions.
47 changes: 28 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,20 +239,26 @@ jobs:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- name: Download pixi binary
- name: Create pixi directory and add to PATH
run: |
set -o pipefail
mkdir -p ~/custom-existing-pixi
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
curl -L --output ~/custom-existing-pixi/pixi.exe https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-pc-windows-msvc.exe
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
curl -L --output ~/custom-existing-pixi/pixi https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-apple-darwin
chmod +x ~/custom-existing-pixi/pixi
else
curl -L --output ~/custom-existing-pixi/pixi https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-unknown-linux-musl
chmod +x ~/custom-existing-pixi/pixi
fi
echo ~/custom-existing-pixi >> $GITHUB_PATH
echo "~/custom-existing-pixi" >> $GITHUB_PATH
- name: Download pixi binary (Windows)
run: |
curl -L --output ~/custom-existing-pixi/pixi.exe https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-pc-windows-msvc.exe
if: matrix.os == 'windows-latest'
- name: Download pixi binary (macOS)
run: |
set -o pipefail
curl -L --output ~/custom-existing-pixi/pixi https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-apple-darwin
chmod +x ~/custom-existing-pixi/pixi
if: matrix.os == 'macos-latest'
- name: Download pixi binary (Ubuntu)
run: |
set -o pipefail
curl -L --output ~/custom-existing-pixi/pixi https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-unknown-linux-musl
chmod +x ~/custom-existing-pixi/pixi
if: matrix.os == 'ubuntu-latest'
- uses: ./
with:
cache: false
Expand All @@ -270,16 +276,19 @@ jobs:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- name: Prepare fake pixi executable
- name: Create pixi directory and add to PATH
run: |
mkdir -p ~/custom-existing-pixi
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
echo "fake pixi - this should not execute" > ~/custom-existing-pixi/pixi.exe
else
echo -e '#!/bin/bash\necho "fake pixi - this should not execute"\nexit 1' > ~/custom-existing-pixi/pixi
chmod +x ~/custom-existing-pixi/pixi
fi
echo "~/custom-existing-pixi" >> $GITHUB_PATH
- name: Prepare fake pixi executable (Windows)
run: |
echo "fake pixi - this should not execute" > ~/custom-existing-pixi/pixi.exe
if: matrix.os == 'windows-latest'
- name: Prepare fake pixi executable
run: |
echo -e '#!/bin/bash\necho "fake pixi - this should not execute"\nexit 1' > ~/custom-existing-pixi/pixi
chmod +x ~/custom-existing-pixi/pixi
if: matrix.os != 'windows-latest'
- uses: ./
with:
pixi-version: v0.15.1
Expand Down

0 comments on commit b577c0e

Please sign in to comment.