@@ -111,10 +111,6 @@ jobs:
111111 timeout-minutes : 80
112112 with :
113113 detached : true
114- # Bash login shell on MacOS prepend /usr/bin to PATH, which masks all other installations of Python
115- - name : Workaround for macOS behavior on login shells
116- run : echo "export PATH=\"${{ github.workspace }}/.pixi/envs/default/bin:$PATH\"" | tee -a ~/.bash_profile
117- if : startsWith(matrix.os, 'macos')
118114 - run : ./tools/github_actions_env_vars.sh
119115 # Xvfb/OpenGL
120116 - uses : pyvista/setup-headless-display-action@v4
@@ -127,12 +123,25 @@ jobs:
127123 with :
128124 python-version : ${{ matrix.python }}
129125 if : startswith(matrix.kind, 'pip')
126+ # Python (if pixi)
130127 - uses : prefix-dev/setup-pixi@v0.9.4
131128 with :
132129 manifest-path : tools/pixi.toml
133130 # https://github.com/prefix-dev/setup-pixi/issues/139
134131 activate-environment : true
132+ frozen : true
135133 if : matrix.kind == 'pixi'
134+ # Bash login shell on MacOS prepend /usr/bin to PATH, which masks all other installations of Python
135+ - name : Workaround for macOS behavior on login shells
136+ run : echo "export PATH=\"${{ github.workspace }}/.pixi/envs/default/bin:$PATH\"" | tee -a ~/.bash_profile
137+ if : startsWith(matrix.os, 'macos')
138+ - name : Verify that the pixi env is on PATH
139+ if : matrix.kind == 'pixi'
140+ run : |
141+ if [[ "$(which python)" != *'/.pixi/'* ]]; then
142+ echo "Python is NOT running from a virtual environment"
143+ exit 1
144+ fi
136145 # Python (if conda)
137146 - name : Fixes for conda
138147 run : |
0 commit comments