Skip to content

Commit

Permalink
Change tests
Browse files Browse the repository at this point in the history
  • Loading branch information
noscode committed Nov 4, 2024
1 parent 5be2f09 commit 7f63d32
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,50 @@ jobs:
- name: Checkout.
uses: actions/checkout@v2

- name: Set up Conda environment.
uses: conda-incubator/setup-miniconda@v3
- name: find conda
id: find-conda
run: |
echo "CONDA=$CONDA" >> $GITHUB_OUTPUT
- name: fix conda permissions
if: runner.os == 'macOS'
run: |
# Fix incorrect conda permissions on mac that prevent cache restore.
sudo chown -R $USER:staff ${{ steps.find-conda.outputs.CONDA }}
- name: cache conda
id: cache
uses: actions/cache@v3
env:
# Increase this to reset the cache if the key hasn't changed.
CACHE_NUM: 9
with:
path: |
${{ steps.find-conda.outputs.CONDA }}/envs/${{ env.CONDA_ENV_NAME }}
~/.bash_profile
key: ${{ runner.os }}-${{ matrix.python }}-conda-${{ hashFiles('requirements/CI/*') }}-${{ env.CACHE_NUM }}

- name: install conda
uses: conda-incubator/setup-miniconda@v2
if: steps.cache.outputs.cache-hit != 'true'
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge,bioconda
activate-environment: ${{ env.CONDA_ENV_NAME }}

- name: Install dadi and scikit-allel using conda.
python-version: ${{ matrix.python }}
channels: conda-forge, bioconda
channel-priority: strict
auto-update-conda: true
use-only-tar-bz2: true

- name: move profile
if: steps.cache.outputs.cache-hit != 'true' && runner.os != 'Windows'
run: |
# The setup-miniconda action leaves different shell init files for
# different OSes. Bash gives priority to ~/.bash_profile, so here we
# ensure that's used for all platforms.
mv ~/.profile ~/.bash_profile
- name: install dadi and scikit-allel using conda.
if: steps.cache.outputs.cache-hit != 'true'
run: |
conda install dadi
conda install scikit-allel
Expand Down

0 comments on commit 7f63d32

Please sign in to comment.