Skip to content

Commit

Permalink
use miniforge for test envs
Browse files Browse the repository at this point in the history
  • Loading branch information
daler committed Dec 29, 2024
1 parent 9039e05 commit e8ce49c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,18 @@ jobs:
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "WORKDIR=$(pwd)" >> $GITHUB_ENV
- name: install miniforge
run: |
wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3.sh -b -p "${HOME}/conda"
- name: cythonize and pip
# Convert .pyx files to .cpp and package into sdist tarball.
#
# This only requires Cython, Python, and g++. Then install the tarball
# with pip to make sure it works.
run: |
eval "$(conda shell.bash hook)"
source "${HOME}/conda/etc/profile.d/conda.sh"
conda create -p ./cython-env -y "cython>=0.29.30,<3.0" python=${{ matrix.python-version }} gxx zlib --channel conda-forge
conda activate ./cython-env
python setup.py clean cythonize sdist
Expand All @@ -61,7 +64,7 @@ jobs:
#
# Tests below will operate in this newly-installed directory.
run: |
eval "$(conda shell.bash hook)"
source "${HOME}/conda/etc/profile.d/conda.sh"
conda install python=${{ matrix.python-version }} -y --channel conda-forge
# Only install non-python dependencies (like bedtools & ucsc tools);
Expand Down Expand Up @@ -91,7 +94,7 @@ jobs:
# Run pytest and sphinx doctests
run: |
cd $WORKDIR
eval "$(conda shell.bash hook)"
source "${HOME}/conda/etc/profile.d/conda.sh"
conda activate ./test-env
# Extract the package tarball built above, and use that for running the tests.
Expand All @@ -107,7 +110,7 @@ jobs:
# Build docs and commit to gh-pages branch. Note that no push happens
# unless we're on the master branch
run: |
eval "$(conda shell.bash hook)"
source "${HOME}/conda/etc/profile.d/conda.sh"
conda activate ./test-env
# Move to extracted tarball dir, see above notes
Expand Down

0 comments on commit e8ce49c

Please sign in to comment.