-
-
Notifications
You must be signed in to change notification settings - Fork 59
/
.travis.yml
96 lines (78 loc) · 4.4 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
---
sudo: required
services:
- docker
language: python
python:
- "2.7"
env:
- TIKA_APP_JAR=/tmp/tika-app-${TIKA_VER}.jar
FAUP_PATH=/tmp/faup
DOCKER_ELASTICSEARCH_PATH=/tmp/docker-elasticsearch
before_install:
- sudo apt-get -qq update
- >
sudo apt-get -yqq --no-install-recommends install
build-essential
cmake
libfuzzy-dev
p7zip-full
unrar
unzip
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
# Build spamscope-elasticsearch
- if [ "$TRAVIS_BRANCH" == "master" ]; then
git clone -b $TRAVIS_BRANCH --single-branch https://github.com/SpamScope/spamscope-dockerfile-elasticsearch.git $DOCKER_ELASTICSEARCH_PATH;
cd $DOCKER_ELASTICSEARCH_PATH && docker build --build-arg SPAMSCOPE_VER=master -t $DOCKER_USERNAME/spamscope-elasticsearch . && cd -;
docker run --rm -it $DOCKER_USERNAME/spamscope-elasticsearch /bin/sh -c 'python -m unittest discover -s tests -f -v';
docker run --rm -it $DOCKER_USERNAME/spamscope-elasticsearch /bin/sh -c 'thug -V && spamscope-topology -v && spamscope-elasticsearch -v';
fi
- if [ "$TRAVIS_BRANCH" == "develop" ]; then
git clone -b $TRAVIS_BRANCH --single-branch https://github.com/SpamScope/spamscope-dockerfile-elasticsearch.git $DOCKER_ELASTICSEARCH_PATH;
cd $DOCKER_ELASTICSEARCH_PATH && docker build --build-arg SPAMSCOPE_VER=develop -t $DOCKER_USERNAME/spamscope-elasticsearch:develop . && cd -;
docker run --rm -it $DOCKER_USERNAME/spamscope-elasticsearch:develop /bin/sh -c 'python -m unittest discover -s tests -f -v';
docker run --rm -it $DOCKER_USERNAME/spamscope-elasticsearch:develop /bin/sh -c 'thug -V && spamscope-topology -v && spamscope-elasticsearch -v';
fi
# command to install dependencies
install:
- pip install --upgrade pip setuptools
- python setup.py install
- pip install -r requirements_optional.txt
- src/cli/faup.sh
- pip install coveralls
before_script:
- curl -o ${TIKA_APP_JAR} https://archive.apache.org/dist/tika/tika-app-${TIKA_VER}.jar
# command to run tests
script:
# Unittests and coverage
- coverage run -m unittest discover -s tests -f -v
# timing
- python tests/timing_test_search_keywords.py
# cli help
- spamscope-elasticsearch -h
- spamscope-topology -h
- spamscope-elasticsearch -v
- spamscope-topology -v
deploy:
provider: pypi
user: fmantuano
password:
secure: "lPuvh9if9jZrtgk/i9++D7v1BGfyEj9kalJy52yfjOARZ3xskrvHLjJMIxu9wFndYYdUAz8J1Y2WsKLDyYyfMwiAFadU2xmsobNunGO95CNUadbfJojaH7LartWQN+gnw98svJTms9GLHLmO8eH2j5BsH2mubOaWm8T0lF3Pjs0NncXdi6HzSQ63qGj6ctjFzAmTqoK14EzbGVAu1KRBzO6hdu41/nhWx1ufRZYBNeEjtNCZfIl74ALdCpEEQfqTl5hgMA9ybuXvcAmZMOWVjBQiXjSeAUoz+u2FYBkzSxx0Sst1MkKoC3iG6p+Z2E4WHya63ew1GQyyug7XSmq8JpaKRFtktU2b5g+AcqKmLsf0nw+2x/pjGxJIyy69OnX7oGr9fQTGGMHg36OU8vdyhOX+40nHEXC+M45rS/ma+tYSrL+j2Mn1kKreOjoC6kV1g+bgX2eSVFicFonB++ySFSt8D5b7zQibIx0BCxzN/WpNu99/0DTFpA0n9ox7+4F4Jzrn3a8IM56I/RyqBqh8ce7TjhOwsF6n8Egjk9ywVuZW8OuohBTxdosU+TAntlNCmGgECcdXzSGqTXLPWjfe2U7C4qtBVwHMlptYxZNs8XvlJksysM8Cyp+dUjXJCLqPH2n55aK9+x6Pzq/cSM1ldzXg+iZcO9XXoEDJ1bLXVDE="
on:
tags: true
repo: SpamScope/spamscope
branch: master
after_success:
- coveralls
- if [ "$TRAVIS_BRANCH" == "master" ]; then
echo $DOCKER_PASSWORD | docker login -u="$DOCKER_USERNAME" --password-stdin;
docker push $DOCKER_USERNAME/spamscope-elasticsearch;
fi
- if [ "$TRAVIS_BRANCH" == "develop" ]; then
echo $DOCKER_PASSWORD | docker login -u="$DOCKER_USERNAME" --password-stdin;
docker push $DOCKER_USERNAME/spamscope-elasticsearch:develop;
fi
notifications:
email: false
slack:
secure: C9SiQ+mfwtLEpyn7cJRpR4e1KNTNNWVLIe+zmq78+LSCeHOpdsfbCp2Y2/C7nbcBj1yLLxmfa30PkPX2tRBady5MikXj05+tblOic3RdMoAAsGErMwAWEzysWy1z1l1bNrnviQ7rExpyRq+6lkg8zj8vIoKh2WZlcSJpQmKd4gzwITFgdawwiraioEf20I/nVon/U/S4NqINDrv6BhffngKwRcBary7GexPNfu/lTR4bg0Ow8isi4Gbu9naU24ueoiuXsUtXSuwQUPuJEAnWFKsZpJ7g053RpRNkOZAYcsdM5e3RegdPbby9+c/XSAPXGjzWfI8j+EcgTFtDZI0pAStGIilsdf7K9y7OkL0JHgS9lIYtgNLRkMBHdHyvGqEmZYExXl1gwi8RhmfoJdiOwVW0AuqmnqpvmTDaimzyBJZ9hR62u9ZLXh9XP6mNYxgWmRp1zeRfHliFv+5iPIcEiST85IWXQpt2uy+Isb7XaY8edtkfjLkEXiPAtB9jU/QEVRCsw1Ei0QzUWyY7QZxptwNemzC6FnNbVO40O3ifC3KgUfKj34TIQb892OM51yHNabeGkGdHDD91TM0d3tnjXl/6O339lMN97mtkVFtJDS5jxwyfxJtGmSqzvyZ0Xx5WVKcBcIbmDoJ7dk8+GW+p6BclUaKwWLJc4mpiYVOaD/U=