forked from peterjc/galaxy_blast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
150 lines (140 loc) · 5.96 KB
/
.travis.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# This is a special configuration file to run tests on Travis-CI via
# GitHub notifications when changes are committed.
#
# See http://travis-ci.org/ for details
# We need Python 2.6 or 2.7 to run Galaxy (and some of the wrappers)
# but don't really care which. We also need Java to run Blast2GO,
# and perhaps the simplest way to get that installed to to run this
# entire TravisCI build as "java" (which will still have a system
# python installed).
#
language: java
# Installing Galaxy
# =================
#
# Before installing our Galaxy wrappers, we need to install Galaxy.
# That may mean using hg to clone it from BitBucket, but too slow?
#
# $ time hg clone https://bitbucket.org/galaxy/galaxy-dist
# ...
# 3m14s
#
# Could use wget to just grab the a specific branch/revision?
#
# $ time wget https://bitbucket.org/galaxy/galaxy-dist/get/stable.tar.bz2
# ...
# 1m33s
#
# We can do better using a GitHub mirror, such as John Chilton's
#
# $ time git clone https://github.com/jmchilton/galaxy-central.git
# ...
# 44s
#
# But better yet seems to be a tar-ball from the GitHub mirror,
#
# $ time wget https://github.com/jmchilton/galaxy-central/archive/master.tar.gz
# ...
# 22s
#
# Note it redirects so wget downloads the tar-ball as a file just called master,
# https://codeload.github.com/jmchilton/galaxy-central/tar.gz/master
#
# However, we might want to focus on the stable release branch?
#
#
# Installing Tool Dependencies
# ============================
#
# We grab Galaxy, and will later make configuration changes specifically
# for testing our tools. Otherwise we use the default settings such as
# running with an SQLite database.
#
# We also need to install our tool dependencies, e.g. NCBI BLAST+ binaries,
# which we will do manually rather than via a (local) Galaxy Tool Shed.
#
before_install:
- mkdir "$HOME/.python-eggs"
- chmod 700 "$HOME/.python-eggs"
- echo "Fetching and installing Blast2GO for pipelines (b2g4pipe)..."
- wget http://www.blast2go.com/data/blast2go/b2g4pipe_v2.5.zip
- unzip b2g4pipe_v2.5.zip
- cp b2g4pipe/b2gPipe.properties b2g4pipe/Spain_2012_August.properties
- sed -i "s/Dbacces.dbname=b2g_apr12/Dbacces.dbname=b2g_aug12/g" b2g4pipe/Spain_2012_August.properties
- sed -i "s/Dbacces.dbhost=10.10.100.203/Dbacces.dbhost=publicdb.blast2go.com/g" b2g4pipe/Spain_2012_August.properties
- cp b2g4pipe/b2gPipe.properties b2g4pipe/Spain_2011_June.properties
- sed -i "s/Dbacces.dbname=b2g_apr12/Dbacces.dbname=b2g_jun11/g" b2g4pipe/Spain_2011_June.properties
- sed -i "s/Dbacces.dbhost=10.10.100.203/Dbacces.dbhost=publicdb.blast2go.com/g" b2g4pipe/Spain_2011_June.properties
- export B2G4PIPE="${TRAVIS_BUILD_DIR}/b2g4pipe/"
- echo "Fetching and installing NCBI BLAST+..."
- wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.29/ncbi-blast-2.2.29+-x64-linux.tar.gz
- tar -zxvf ncbi-blast-2.2.29+-x64-linux.tar.gz | tail
- export PATH="${TRAVIS_BUILD_DIR}/ncbi-blast-2.2.29+/bin:$PATH"
- echo "Fetching Galaxy..."
- wget https://codeload.github.com/jmchilton/galaxy-central/tar.gz/master
- tar -zxvf master | tail
- cd galaxy-central-master
# Configuring tools within Galaxy
# ===============================
#
# We setup a minimal tool_conf.xml and/or tool_conf.xml.sample file to
# get Galaxy to just test our tools, rather than via a (local) Galaxy
# Tool Shed.
#
# TODO - GALAXY_TEST_TOOL_CONF environment variable rather than symlink?
#
# We setup our tools under the Galaxy tool folder by using symlinks.
# TODO - Restructure this to auto-update in future when add folders?
#
# We setup our datatypes by adding blast.py to the Galaxy library, and
# adding the insert into lib/galaxy/datatypes/registry.py, and replacing
# the datatypes_conf.xml file.
#
# We setup our sample data in the Galaxy test-data folder by copying them
# (using symlinks might be faster?)
#
# We setup out sample *.loc files in the Galaxy tool-data folder by copying
# them (using symlinks might be faster?)
#
# We then want to use run.sh to setup all the sample files, fetch eggs etc,
# but not actually start running Galaxy. One way to do this is by calling
# "./run.sh --stop-daemon" but must override its error level 1 return value.
#
install:
- export GALAXY_TEST_DB_TEMPLATE=https://github.com/jmchilton/galaxy-downloads/raw/master/db_gx_rev_0117.sqlite
- ln -s ${TRAVIS_BUILD_DIR}/.travis.tool_conf.xml tool_conf.xml
- rm tool_conf.xml.sample
- ln -s ${TRAVIS_BUILD_DIR}/.travis.tool_conf.xml tool_conf.xml.sample
- ln -s ${TRAVIS_BUILD_DIR}/tools/ncbi_blast_plus/ tools/ncbi_blast_plus
- ln -s ${TRAVIS_BUILD_DIR}/tools/blastxml_to_top_descr/ tools/blastxml_to_top_descr
- ln -s ${TRAVIS_BUILD_DIR}/tools/reciprocal_best_hits/ tools/reciprocal_best_hits
- ln -s ${TRAVIS_BUILD_DIR}/tools/blast2go/ tools/blast2go
- ln -s ${TRAVIS_BUILD_DIR}/datatypes/blast_datatypes/blast.py lib/galaxy/datatypes/blast.py
- ln -s ${TRAVIS_BUILD_DIR}/.travis.datatypes_conf.xml datatypes_conf.xml
- sed -i '6 i import blast' lib/galaxy/datatypes/registry.py
- cp ${TRAVIS_BUILD_DIR}/test-data/* test-data/
- cp ${TRAVIS_BUILD_DIR}/tool-data/* tool-data/
- ./run.sh --stop-daemon || true
# Testing tools in Galaxy
# =======================
#
# Having setup our Galaxy with a minimal tool_conf.xml / tool_conf.xml.sample
# we call run_functional_tests.sh to run just our tests (grouped under a
# common section "travis" in the XML file for this purpose).
#
# ./run_functional_tests.sh -sid Continuous-Integration-Travis
#
# calls:
#
# python ./scripts/functional_tests.py --with-nosehtml --html-report-file run_functional_tests.html -v `python tool_list.py Continuous-Integration-Travis`
#
# That gives an error sadly under Travis,
# functional_tests.py: error: no such option: --with-nosehtml
# And also,
# functional_tests.py: error: no such option: --html-report-file
# Perhaps Galaxy's nose egg isn't being fetched?
script:
- python ./scripts/functional_tests.py -v `python tool_list.py Continuous-Integration-Travis`
#The email defaults are too talkative while we're getting Travis working nicely.
notifications:
email: false