Skip to content

Bump ruff from 0.7.2 to 0.8.0 #2556

Bump ruff from 0.7.2 to 0.8.0

Bump ruff from 0.7.2 to 0.8.0 #2556

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 IVA assembler dependencies
run: |
sudo apt-get install -qq zlib1g-dev libncurses5-dev libncursesw5-dev mummer ncbi-blast+
cd ~/bin
wget -q http://sun.aei.polsl.pl/kmc/download-2.1.1/linux/kmc
wget -q http://sun.aei.polsl.pl/kmc/download-2.1.1/linux/kmc_dump
# Server doesn't support HTTPS, so check for changed files.
echo "\
db1935884aec2d23d4d623ff85eb4eae8d7a946c9ee0c33ea1818215c40d3099 kmc
34a97db2dab5fdae0276d2589c940142813e9cd87ae10e5e2dd37ed3545b4436 kmc_dump" | sha256sum --check
chmod +x kmc kmc_dump
wget -q https://github.com/samtools/samtools/releases/download/1.3.1/samtools-1.3.1.tar.bz2
tar -xf samtools-1.3.1.tar.bz2 --no-same-owner --bzip2
cd samtools-1.3.1
./configure --prefix=$HOME
make
make install
cd ~
wget -q https://downloads.sourceforge.net/project/smalt/smalt-0.7.6-bin.tar.gz
tar -xzf smalt-0.7.6-bin.tar.gz
ln -s ~/smalt-0.7.6-bin/smalt_x86_64 ~/bin/smalt
- 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