Skip to content

Replace IVA by Haploflow #2543

Replace IVA by Haploflow

Replace IVA by Haploflow #2543

name: Build and Test MiCall
on: push
jobs:
main:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- run: mkdir -p ~/bin
- run: echo ~/bin >> $GITHUB_PATH
- name: Run apt update
run: sudo apt-get update
- name: Install Haploflow
run: |
sudo apt-get update
sudo apt-get install -y build-essential git ronn
cd /opt/
git clone https://github.com/hzi-bifo/Haploflow
cd Haploflow
git checkout 9a5a0ff6c3a0435e723e41f98fe82ec2ad19cf50
sh build.sh
sudo ln -s /opt/Haploflow/build/haploflow ~/bin/haploflow
- name: Install Rust and merge-mates
run: |
sudo curl https://sh.rustup.rs -sSf | sh -s -- -y
source ~/.cargo/env
cargo install --root ~/ --git https://github.com/jeff-k/merge-mates.git --rev 2fec61363f645e2008a4adff553d098beae21469
- name: Install Bowtie2
run: |
wget -q -O bowtie2.zip https://github.com/BenLangmead/bowtie2/releases/download/v2.2.8/bowtie2-2.2.8-linux-x86_64.zip
sudo unzip -qq bowtie2.zip -d /opt/
sudo ln -s /opt/bowtie2-2.2.8/ /opt/bowtie2
rm bowtie2.zip
# Add to system path
echo "/opt/bowtie2" >> $GITHUB_PATH
- name: Install MiCall's Python dependencies
run: |
python -m pip install --upgrade pip
pip install .[denovo,watcher,dev,test]
- name: Run type checker
run: |
mypy
- name: Run linter
run: |
ruff check
- name: Test with pytest
run: coverage run --source=micall/core,micall/g2p,micall/resistance,micall/monitor -m pytest
- name: Report code coverage
run: |
rm -rf micall/tests/microtest/scratch
codecov
docker-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: docker build --tag micall --file Dockerfile .
- name: Run docker image entrypoint
run: docker run micall --help
- name: Check docker image entrypoint
run: docker run micall --help | grep -i -e 'docker'
singularity-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- uses: actions/setup-go@v2
with:
go-version: '^1.15.6'
- name: Run apt update
run: sudo apt-get update
- name: Install Singularity
run: |
sudo apt-get install -qq \
build-essential \
uuid-dev \
libgpgme-dev \
squashfs-tools \
libseccomp-dev \
wget \
pkg-config \
git \
cryptsetup-bin
git clone https://github.com/singularityware/singularity.git
cd singularity
git checkout -q tags/v3.7.1
./mconfig && \
make -C ./builddir && \
sudo make -C ./builddir install
cd ..
rm -rf singularity
singularity --version
- name: Singularity build
run: sudo singularity build micall.simg Singularity
- name: Singularity test
run: python micall/main.py release_test_microtest micall.simg
- name: Upload Singularity Image
uses: actions/upload-artifact@v4
with:
name: micall.simg
path: micall.simg