-
Notifications
You must be signed in to change notification settings - Fork 9
131 lines (113 loc) · 4.16 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
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.8
- 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
# Have to clean up alignment build files. Otherwise, they'll get reused
# in Singularity build with the wrong GLIBC libraries.
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
- name: Run type checker
run: |
mypy
- name: Run linter
run: |
flake8 micall/
- 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
python -m pip install codecov
codecov
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.8
- 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: Install python packages
run: pip install multicsv
- name: Singularity test
run: python release_test_microtest.py micall.simg
- name: Upload Singularity Image
uses: actions/upload-artifact@v4
with:
name: micall.simg
path: micall.simg