forked from jookies/jasmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (49 loc) · 1.89 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
language: python
python:
- '2.7'
# Command to install dependencies
install:
- python setup.py sdist
- sudo pip install dist/jasmin-0.6.post43.tar.gz
- sudo cp misc/config/init-script/jasmind-ubuntu /etc/init.d/jasmind
- sudo update-rc.d jasmind defaults
# Commands to run tests:
script:
# Service startup test:
- sudo invoke-rc.d jasmind start
- sleep 2
- sudo invoke-rc.d jasmind status
# Stop service:
- sudo invoke-rc.d jasmind stop
# Cleaning before going for further tests:
- sudo rm -f /var/log/jasmin/*;sudo rm -f /etc/jasmin/store/*
# Trial tests and coverage:
- sudo chmod -R 777 /var/log/jasmin /etc/jasmin/store
- sudo coverage run `which trial` jasmin
# Docs building test:
- cd misc/doc;make html;cd ../../
# Report coverage:
- sudo coverage report --omit=/usr/*,/home/travis/virtualenv/*
# Pylint code analysis and rating:
- cd ./misc/pylint; sudo ./run.sh
services:
- rabbitmq
- redis-server
before_script:
# Test requirements:
- sudo pip install -r test-requirements
# pylint requirements:
- sudo apt-get install -qq pylint bc
- chmod +x ./misc/pylint/run.sh
before_install:
- sudo apt-get update -qq
# jasmin installation requirement:
# As documented here http://docs.jasminsms.com/en/latest/installation/index.html
- sudo apt-get install -qq python-dev libffi-dev libssl-dev
- sudo useradd jasmin
- sudo mkdir -p /var/log/jasmin /etc/jasmin/resource /etc/jasmin/init-script /etc/jasmin/store /var/run/jasmin
- sudo chown `whoami` /etc/jasmin /etc/jasmin/resource /etc/jasmin/init-script
- sudo chown jasmin. /var/log/jasmin /etc/jasmin/store /var/run/jasmin
notifications:
slack:
secure: guCY7vL67vUhvNYLzInV/EIPMZ7ciq+/s0UlfmKvGYrjIMwXdgfshgKXdHF194eQ9+f0dF8ea1P1/aGqCE4Q4ULPZ555FbftNy/bVLfUPn01+odorAux3rVNq4ezX2QlQc06DpVS2r7U+grM+MQtNdRjoZIuAeipp3YRhyyuIr8=