forked from arpcard/rgi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add continuous integration for installation and test running on push
- Loading branch information
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: python | ||
|
||
python: | ||
- "3.5" | ||
- "3.6" | ||
|
||
before_install: | ||
- sudo apt-get -qq update | ||
- sudo apt-get install -y ncbi-blast+ prodigal | ||
- wget http://github.com/bbuchfink/diamond/releases/download/v0.9.18/diamond-linux64.tar.gz | ||
- tar xzf diamond-linux64.tar.gz | ||
- sudo mv diamond /usr/bin | ||
|
||
install: | ||
- pip install -r requirements.txt | ||
- pip install . | ||
|
||
script: | ||
- ./test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
requests==2.18.2 | ||
biopython>=1.60 | ||
filetype>=1.0.0 | ||
pytest>=3.0.0 | ||
mock>=2.0.0 | ||
pandas>=0.15.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
# run unit tests for RGI | ||
|
||
# get latest card database | ||
wget -O card_data.tar.bz2 https://card.mcmaster.ca/latest/data | ||
mkdir -p card_data | ||
tar xvf card_data.tar.bz2 -C card_data | ||
|
||
# load rgi | ||
rgi load -i card_data/card.json | ||
|
||
# for test_1.py | ||
cp card_data/card.json app/_data | ||
|
||
# for test_3.py | ||
cp card_data/card.json tests/input | ||
|
||
# run unit tests | ||
cd tests | ||
pytest -v -rxs | ||
|
||
# exit with the exitcode thrown by pytest | ||
exit $? |