-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
89 lines (83 loc) · 4.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
sudo: required
addons:
chrome: stable
matrix:
include:
- os: linux
language: python
python: 2.7
services:
- rabbitmq
- memcached
- postgresql
# command to install dependencies
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install npm; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install rabbitmq; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install memcached; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rm -rf /usr/local/var/postgres; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then initdb /usr/local/var/postgres; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pg_ctl -D /usr/local/var/postgres start; fi
- sleep 5 # let database start
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then createuser -s postgres; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew services start rabbitmq; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew services start memcached; fi
- virtualenv -p python2 env
- source env/bin/activate
- pip2 install -r requirements.txt
- pip2 install -r dev_requirements.txt
- pip2 install coveralls
- pip2 install codecov
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_mac64.zip; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then unzip chromedriver_mac64.zip; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then unzip chromedriver_linux64.zip; fi
- export PATH=$PATH:$(pwd):/usr/local/sbin
before_script:
- psql -c 'create database django;' -U postgres
- psql -c 'create user django;' -U postgres
- psql -c 'grant all on database django to django;' -U postgres
- psql -c 'ALTER USER django CREATEDB;' -U postgres
- mkdir -p ./media/blast/db/
- python2 manage.py migrate
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then gem install awesome_bot; fi
- npm run build
- python manage.py collectstatic --noinput
# command to run tests
script:
- coverage run --source= ./manage.py test blast.tests.ClickAllTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.NucleotideSequenceSimpleTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.NucleotideSequenceComplexTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.PeptideSequenceSimpleTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.PeptideSequenceComplexTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.LoadExampleNucleotideSequenceTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.LoadExamplePeptideSequenceTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.ClickSequenceTypeTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.HoverIntentTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.BlastModelActionTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.BlastAdminTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.BlastBinaryTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.ValidQueryTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.QueryWithNoHitTestCase --noinput
- coverage run --source= ./manage.py test blast.tests.UploadFileTestCase --noinput
- coverage run --source= ./manage.py test hmmer.tests.HmmerAdminTestCase --noinput
- coverage run --source= ./manage.py test hmmer.tests.LoadSeqExampleTestCase --noinput
- coverage run --source= ./manage.py test hmmer.tests.LoadAlignExampleTestCase --noinput
- coverage run --source= ./manage.py test hmmer.tests.UploadFileTestCase --noinput
- coverage run --source= ./manage.py test hmmer.tests.HmmerViewFunctionTestCase --noinput
- coverage run --source= ./manage.py test hmmer.tests.HmmerBinaryTestCase --noinput
- coverage run --source= ./manage.py test clustal.tests.ClustalLoadExampleTestCase --noinput
- coverage run --source= ./manage.py test clustal.tests.ClustalUploadFileTestCase --noinput
- coverage run --source= ./manage.py test clustal.tests.ClustalBinaryTestCase --noinput
- coverage run --source= ./manage.py test filebrowser --noinput
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cat i5k/settings.py | sed -r 's/ENABLE_JBROWSE_INTEGRATION = False/ENABLE_JBROWSE_INTEGRATION = True/g;' > i5k/settings2.py; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cat i5k/settings.py | sed -E 's/ENABLE_JBROWSE_INTEGRATION = False/ENABLE_JBROWSE_INTEGRATION = True/g;' > i5k/settings2.py; fi
- rm i5k/settings.py
- mv i5k/settings2.py i5k/settings.py
- coverage run --source= ./manage.py test blast.tests.JbrowseLinkOutTestCase --noinput
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then awesome_bot --allow-redirect --allow-dupe README.md; fi
after_success:
- coverage report # show the coverage report
- coveralls
- codecov