Skip to content

Commit

Permalink
micromamba
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Jan 5, 2024
1 parent 8ed4316 commit 6f90627
Showing 1 changed file with 31 additions and 11 deletions.
42 changes: 31 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: "3.10"

- name: Install dependencies
run: |
Expand Down Expand Up @@ -55,30 +55,50 @@ jobs:
# - "3.11" # no pysam binaries yet
needs: linting
steps:
- name: Construct environment.yml file for python version
run: |
cat <<EOF > /tmp/environment.yml
name: ngs-chew
channels:
- bioconda
- conda-forge
- defaults
dependencies:
- python=${{ matrix.python-version }}
- pip
- bcftools
- samtools
- pysam
- pandas
- scipy
- numpy
EOF
- name: Setup formatting environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: /tmp/environment.yml
init-shell: bash
cache-environment: true
post-cleanup: none # breaks otherwise

- name: Install Python via conda
uses: s-weigand/setup-conda@v1
with:
python-version: ${{ matrix.python-version }}
conda-channels: defaults,bioconda,conda-forge

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
lfs: true

- name: Install mamba
run: conda install -y mamba

- name: Install external dependencies with mamba
run: mamba install -y bcftools samtools

- name: Save time by installing packages via mamba
run: mamba install -y pysam pandas scipy numpy

- name: Install test dependencies via pip
run: pip install -r requirements/test.txt
shell: bash -el {0}

- name: Run tests
run: |
pytest
coverage report
shell: bash -el {0}

0 comments on commit 6f90627

Please sign in to comment.