Repository navigation
Expand file tree
/
Copy path.travis.yml
More file actions
108 lines (108 loc) · 5.1 KB
/
Copy path.travis.yml
File metadata and controls
108 lines (108 loc) · 5.1 KB
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
dist: xenial
language: python
sudo: false
env:
global:
- PYTHON_VERSION=3.6
matrix:
- TEST_ADD_STUDIES=False COVER_PACKAGE=qiita_db QIITA_CLIENT_DEBUG_LEVEL=DEBUG
- TEST_ADD_STUDIES=True COVER_PACKAGE="qiita_pet qiita_core qiita_ware" QIITA_CLIENT_DEBUG_LEVEL=DEBUG
before_install:
- redis-server --version
- redis-server --port 7777 &
- wget http://repo.continuum.io/miniconda/Miniconda3-4.3.31-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda3/bin:$PATH
# Downloading and setting up ascp for EBI testing
- wget ftp://ftp.microbio.me/pub/qiita/ascp-install-3.5.4.102989-linux-64-qiita.sh -O ascp-install-3.5.4.102989-linux-64-qiita.sh
- chmod +x ascp-install-3.5.4.102989-linux-64-qiita.sh
- ./ascp-install-3.5.4.102989-linux-64-qiita.sh
install:
# install a few of the dependencies that pip would otherwise try to install
# when intalling scikit-bio
- travis_retry conda create -q --yes -n qiita python=3.6 pip libgfortran numpy nginx
- source activate qiita
- pip install -U pip
- 'echo "backend: Agg" > ~/matplotlibrc'
- pip install sphinx sphinx-bootstrap-theme nose-timer codecov Click
- git clone https://github.com/nicolasff/webdis
- pushd webdis
- make
- ./webdis &
- popd
- travis_retry pip install . --no-binary redbiom
# starting nginx
- mkdir /home/travis/miniconda3/envs/qiita/var/run/nginx/
- nginx -c ${PWD}/qiita_pet/nginx_example.conf
# loading redbiom with Qiita's test set
# but first let's make sure redis is empty
# following https://github.com/biocore/redbiom/blob/master/Makefile
- export REDBIOM_HOST=http://127.0.0.1:7379
- curl -s http://127.0.0.1:7379/FLUSHALL > /dev/null
- redbiom --version
- redbiom admin scripts-writable
- redbiom admin create-context --name "qiita-test" --description "qiita-test context"
- redbiom admin load-sample-metadata --metadata `pwd`/qiita_db/support_files/test_data/templates/1_19700101-000000.txt
- redbiom admin load-sample-metadata-search --metadata `pwd`/qiita_db/support_files/test_data/templates/1_19700101-000000.txt
- redbiom admin load-sample-data --table `pwd`/qiita_db/support_files/test_data/processed_data/1_study_1001_closed_reference_otu_table.biom --context qiita-test --tag 4
- redbiom admin load-sample-data --table `pwd`/qiita_db/support_files/test_data/processed_data/1_study_1001_closed_reference_otu_table-for_redbiom_tests.biom --context qiita-test --tag 5
- mkdir ~/.qiita_plugins
- export REDBIOM_HOST=http://127.0.0.1:7379
- touch ~/.bash_profile
- ssh-keygen -t rsa -C "ssh test key" -f $PWD/qiita_ware/test/test_data/test_key -P ""
- mv $PWD/qiita_ware/test/test_data/test_key.pub ~/.ssh/
- ssh-keyscan localhost >> ~/.ssh/known_hosts
- cat ~/.ssh/test_key.pub >> ~/.ssh/authorized_keys
- scp -i $PWD/qiita_ware/test/test_data/test_key localhost:$PWD/qiita_ware/test/test_data/random_key $PWD/qiita_ware/test/test_data/random_key_copy
# Install the biom plugin so we can run the analysis tests
- wget https://data.qiime2.org/distro/core/qiime2-2019.4-py36-linux-conda.yml
- travis_retry conda env create -q -n qtp-biom --file qiime2-2019.4-py36-linux-conda.yml
- rm qiime2-2019.4-py36-linux-conda.yml
- source activate qtp-biom
- pip install -U pip
- pip install https://github.com/qiita-spots/qiita_client/archive/master.zip
- pip install https://github.com/qiita-spots/qtp-biom/archive/master.zip
- export QIITA_SERVER_CERT=`pwd`/qiita_core/support_files/server.crt
- configure_biom --env-script "source ~/virtualenv/python2.7/bin/activate; export PATH=$HOME/miniconda3/bin/:$PATH; . activate qtp-biom" --server-cert $QIITA_SERVER_CERT
- source deactivate
- source activate qiita
before_script:
- qiita-env make --no-load-ontologies
- qiita-test-install
- qiita plugins update
script:
# Some of the tests rely on the plugin system to complete successfuly.
# Thus, we need a qiita webserver running to be able to execute the tests.
# - if [ ${TRAVIS_BRANCH} == "master" ] && [ ${TRAVIS_PULL_REQUEST} == "false" ]; then ./travis_ebi_setup.sh ; fi
- export QIITA_CONFIG_FP=qiita_core/support_files/config_test.cfg
- ls $QIITA_CONFIG_FP
- supervisord -c qiita_pet/supervisor_example.conf
- sleep 5
# check supervisord logs
- cat /tmp/supervisord.log
- source deactivate
- source activate qtp-biom
- start_biom https://localhost:8383 register ignored
- source deactivate
- source activate qiita
- nosetests $COVER_PACKAGE --with-doctest --with-coverage --with-timer -v --cover-package=$COVER_PACKAGE -e 'test_submit_EBI_parse_EBI_reply_failure' -e 'test_full_submission'
- QIITA_PID=`cat /tmp/supervisord.pid`
- kill $QIITA_PID
- sleep 5
# check supervisord logs
- cat /tmp/supervisord.log
- if [ ${TEST_ADD_STUDIES} == "True" ]; then test_data_studies/commands.sh ; fi
- if [ ${TEST_ADD_STUDIES} == "True" ]; then all-qiita-cron-job; fi
- flake8 qiita_* setup.py scripts/qiita*
- qiita pet webserver
addons:
postgresql: "9.5"
apt:
packages:
- libevent-dev
services:
- redis-server
- postgresql
after_success:
- if [ ${TEST_ADD_STUDIES} == "False" ]; then codecov ; fi