Skip to content

Commit

Permalink
GHA: revamp with micromamba
Browse files Browse the repository at this point in the history
  • Loading branch information
js2264 committed Aug 29, 2023
1 parent 70771a5 commit 786aed0
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 12 deletions.
32 changes: 20 additions & 12 deletions .github/workflows/build.yml
Expand Up @@ -9,23 +9,31 @@ jobs:
max-parallel: 5

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2

- name: Checkout repo
uses: actions/checkout@v2

- name: Create micromamba env. for package
uses: mamba-org/setup-micromamba@v1
with:
python-version: 3.9
- name: Add conda to system path
generate-run-shell: true
environment-file: environment.yml

- name: Install package
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
pip install .
shell: micromamba-shell {0}

- name: Check installed package
run: |
conda config --add channels bioconda
conda install -c conda-forge python=3.9 minimap2 bowtie2=2.4.5 bwa samtools htslib pysam pytest cooler pytest-cov pylint codecov mappy
pip install -Ur requirements.txt
pip install pytest-pylint
hicstuff --version
shell: micromamba-shell {0}

- name: Lint and test
run: |
pip install pytest-pylint pytest pytest-cov pylint codecov mappy
pytest --pylint --pylint-error-types=EF --pylint-rcfile=.pylintrc --doctest-modules --doctest-modules hicstuff
pytest --cov=hicstuff
codecov
shell: micromamba-shell {0}

24 changes: 24 additions & 0 deletions environment.yml
@@ -0,0 +1,24 @@
name: env-name
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- python >= 3.7
- pip
- bowtie2
- bwa
- minimap2
- samtools
- numpy
- scipy
- pandas >= 1.5.0
- matplotlib >= 3.4.0
- docopt
- biopython
- requests
- scikit-learn
- pysam
- htslib
- pyfastx
- cooler

0 comments on commit 786aed0

Please sign in to comment.