diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4baa675..d668780 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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} + diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..9407551 --- /dev/null +++ b/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 \ No newline at end of file