Skip to content

Commit 4136ad7

Browse files
authored
Merge pull request django-haystack#1649 from acdha/enable-codecov
Test enabling codecov
2 parents e60031f + 637b1c8 commit 4136ad7

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

.travis.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,26 @@ before_install:
3232
# See https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html#deb-repo
3333
- wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
3434
- >
35-
if [[ $VERSION_ES == '>=2.0.0,<3.0.0' ]];
36-
then
37-
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
38-
sudo apt-get update
39-
sudo apt-get -qy --allow-downgrades install elasticsearch=2.4.6
40-
elif [[ $VERSION_ES == '>=5.0.0,<6.0.0' ]];
41-
then
42-
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-5.x.list
43-
sudo apt-get update -qy
44-
sudo apt-get -y --allow-downgrades install elasticsearch=5.6.10
45-
else
46-
echo "deb http://packages.elastic.co/elasticsearch/1.7/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-1.7.list
47-
sudo apt-get update -qy
48-
sudo apt-get -qy --allow-downgrades install elasticsearch=1.7.6
49-
fi
35+
if [[ $VERSION_ES == '>=2.0.0,<3.0.0' ]];
36+
then
37+
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
38+
sudo apt-get update
39+
sudo apt-get -qy --allow-downgrades install elasticsearch=2.4.6
40+
elif [[ $VERSION_ES == '>=5.0.0,<6.0.0' ]];
41+
then
42+
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-5.x.list
43+
sudo apt-get update -qy
44+
sudo apt-get -y --allow-downgrades install elasticsearch=5.6.10
45+
else
46+
echo "deb http://packages.elastic.co/elasticsearch/1.7/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-1.7.list
47+
sudo apt-get update -qy
48+
sudo apt-get -qy --allow-downgrades install elasticsearch=1.7.6
49+
fi
5050
- sudo service elasticsearch restart
5151

5252
install:
5353
- pip install --upgrade setuptools
54+
- pip install codecov coverage
5455
- pip install requests "Django${DJANGO_VERSION}" "elasticsearch${VERSION_ES}"
5556
- python setup.py clean build install
5657

@@ -59,7 +60,10 @@ before_script:
5960

6061
script:
6162
- python test_haystack/solr_tests/server/wait-for-solr
62-
- python setup.py test
63+
- coverage run setup.py test
64+
65+
after_success:
66+
- codecov
6367

6468
env:
6569
matrix:
@@ -108,5 +112,5 @@ matrix:
108112
env: DJANGO_VERSION=">=2.1,<2.2" VERSION_ES=">=1.0.0,<2.0.0"
109113

110114
notifications:
111-
irc: "irc.freenode.org#haystack"
115+
irc: 'irc.freenode.org#haystack'
112116
email: false

0 commit comments

Comments
 (0)