From 6f90627d137276a1b5dba919fd262852509e7d36 Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Fri, 5 Jan 2024 16:33:15 +0100 Subject: [PATCH] micromamba --- .github/workflows/main.yml | 42 ++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 48e5a9e..0629ded 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: | @@ -55,6 +55,33 @@ jobs: # - "3.11" # no pysam binaries yet needs: linting steps: + - name: Construct environment.yml file for python version + run: | + cat < /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: @@ -62,23 +89,16 @@ jobs: 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}