Skip to content

version

version #126

Workflow file for this run

name: build-and-test
on:
push:
pull_request:
jobs:
build-and-test:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.10"
architecture: "x86_64"
auto-activate-base: true
channels: conda-forge,bioconda
channel-priority: strict
auto-update-conda: true
- name: Build conda package
run: |
conda install -n base conda-build -y
conda build conda-recipe --output-folder build_artifacts
- name: Create conda env
run: |
conda create -n bit -y
- name: Add local area as channel
run: |
conda run -n bit conda config --add channels file://${PWD}/build_artifacts
- name: Install built package
run: |
conda run -n bit conda install bit -y
conda run -n bit pip install -e . # the editable pip install is so test coverages make sense
- name: Set env var so subprocesses get coverage
run: echo "COVERAGE_PROCESS_START=.coveragerc" >> $GITHUB_ENV
- name: Run pytest
run: |
conda run -n bit pytest