Skip to content

Commit

Permalink
for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahlanzrath committed Dec 6, 2024
1 parent 569c236 commit b7b34bd
Showing 1 changed file with 36 additions and 6 deletions.
42 changes: 36 additions & 6 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,21 @@ jobs:
- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Set Cache Path and Conda PATH
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
echo "CACHE_ENV_PATH=C:\\Users\\runneradmin\\miniconda3" >> $GITHUB_ENV
else
echo "CACHE_ENV_PATH=$HOME/miniconda3" >> $GITHUB_ENV
fi
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: ${{env.CACHE_ENV_PATH}}
key: ${{ matrix.os }}-python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }}
id: restore-cache

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v3
Expand All @@ -55,14 +69,30 @@ jobs:
key: ${{ matrix.os }}-python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }}
id: cache

- name: Update environment
- name: Update Environment (Windows)
run: |
mamba install "setuptools>=69" "pip>=24"
call "%CONDA%\etc\profile.d\conda.bat"
conda activate cadet-process
mamba install python=${{ matrix.python-version }}
echo "python=${{ matrix.python-version }}.*" > $CONDA_PREFIX/conda-meta/pinned
mamba env update -n cadet-process -f ${{ env.CONDA_FILE }}
if: steps.cache.outputs.cache-hit != 'true'
echo "python=${{ matrix.python-version }}.*" > %CONDA_PREFIX%\conda-meta\pinned
mamba env update -n cadet-process -f %CONDA_FILE%
where python
python --version
shell: cmd /C call {0}

- name: Install (Windows)
run: |
call "%CONDA%\etc\profile.d\conda.bat"
conda activate cadet-process
pip install -e ./[testing]
shell: cmd /C call {0}

- name: Run Tests (Windows)
run: |
call "%CONDA%\etc\profile.d\conda.bat"
conda activate cadet-process
python -m unittest discover -s tests
shell: cmd /C call {0}
- name: Install
run: |
pip install -e ./[testing]
Expand Down

0 comments on commit b7b34bd

Please sign in to comment.