-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
123 lines (120 loc) · 6.83 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
language: python
sudo: true
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
install:
# Install all Python requirements (application and tests)
- ./test/setup_test.sh
# To help eventual debug: knowing which exact versions are in use can be rather useful.
- pip freeze
script:
# Code dynamic analysis and tests
- cd test
# Run test suite with py.test running its coverage plugin
- pytest --verbose --durations=10 --no-print-logs --cov=alignak_module_import_glpi --cov-config .coveragerc test_*.py
# Report about coverage - Upload coverage results to codecov
- bash <(curl -s https://codecov.io/bash)
- cd ..
jobs:
include:
- stage: Coding standard
python: 3.6
script:
# Static code analysis
# -- pycodestyle (former pep8)
- pycodestyle --max-line-length=100 --exclude='*.pyc, *.cfg, *.log' --ignore='E402' --ignore='W504' alignak_module_import_glpi/*
# -- pylint
- pylint --rcfile=.pylintrc -r no alignak_module_import_glpi
# -- pep257
- pep257 --select=D300 alignak_module_import_glpi
- stage: Pypi deployment
python: 3.6
script: echo "Deploying to PyPi..."
if: (tag IS present)
deploy:
- provider: pypi
distributions: "sdist bdist_wheel"
skip_existing: true
on:
tags: true
user: alignak
password:
secure: "rhf7GJUclVlQm96S8LXNB9hZSOhrVe/6XjGLAGiHEAHEOsoesGiNYuM+WkAFrD1IzQtzkwUHhWEN5H6Aux9XDk75uUTQP1crOdHNez7CrbFmwc9z8bjGYwMhGaus2MCqBELsrwAXVgRg9W/CmLmyACL9S7le/Wz32KMCYt0RO7pBvwmCNsUwEfBL+gu9GzXGjITTdbOGm5IWSQbhaxZ18WWbzUZvNrfY3bEUmqOQYwwiwGZIXMi+H6fVd5Mhrg1yDDAoHbJ7VVS3fJSA1/2OmAqXveSP+dEhI8zBajmVC7X2Fb33MnwcG/m49kAbte9om03OA+/jsJOEWXqhGgX35FjuFxi7uZMexmGw6dtHSRBmM0Gpomq6CGCrz/Wx2ohfWkr5F2uQGiR1maD51o1QpHYypXlF4fnUvdrR0gWcKjOqVbZGlukFZmthZ3ocebLQZ6xeuCPuiKGiBbpExF/xVzZV/uyoBWqaW5WePbGlSqALcF66CmW0FqE0B+I/CdXO8k4LvLbKBA1hYtAbFC1xQvEfbMKbeRtmqrHyWePfAy/nU+aCwCHfY0uKZGv8WwBrZN6Pxq/K1/OfdCfpe3ewSuVewSvGsW0uByDw1O5mSaIG7Neb85Ym9tq9d0d0EeYXqlDHJ2LPt9aRWXejOTSdegGpaeLuDisNWPDtAXUbdt0="
- stage: Debian packaging - Python 2
python: 2.7
if: (tag IS blank)
install:
# Install packaging requirements
- echo "Installing packaging requirements..."
- pip install -r requirements.txt
script:
- echo "Packaging for BinTray..."
- ./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION deb
deploy:
- provider: bintray
skip_cleanup: true
file: dist/.bintray-deb.json
on:
all_branches: true
user: mohierf
key:
secure: "pwOIRVNK+59vT9AxDsXUwydoXha3GyMbMqDOmp+O8HvLuS+FTOTtufP9ktPcZ9Tr8jY+fp3F6woECNOSECFX9WBMfcw1GwJ1Zb/ELrqbNTmZsnNeNAfT8FCcItiySWWMzO20V9OWcPv+JoWTZ/nUKhhSfCx5E8K1v4MfjpRiY9Vet4lymHnTgsEKR4/aKX0YtXb6ONO0ccklolqScmgv1V3U+K8b+94avhlc3bTQ8MGVXZuWutqKtRiyT4hAR4OCoauW2Sjz2ZqpDFHCv2PjAqrV5HteLW5aq0afH6eolm48W8SqCLGNkL24ieuVRp54iZyo9+991jWYcyL8Ozgsn25kAYa3VhlC/umokK5S6wCbb1kqAUJo2fdw8PwDexnY6Bhb/5hRqjx8lQ8prElukoPIBpUEIjsxyk3/cVvryGZnTBmg94QWlnldTOwoSDCW1FxChefgUNsAZrciFvubbOayeI93kNAgq9qkWXpSg6Bb4YszEwXMyNP5RAaEmkHFIfNBkvEZEPjuHIGXx0w172xCkMUU/eR4Ud48l4KKaQ4GNDwL+egoA/uzyR6pW1Tnfx2JxkQviQ4T/u2N4ulD3HuwXiPnEQVeMvMMbAg4CoiCLNYWheforJ1a9Gcwa+7MBGMuMNrSgQKb+tSN1UHJvoGOJoi+YugDOz5mBuOC5I8="
- stage: Debian packaging - Python 3
python: 3.6
if: (tag IS blank)
install:
# Install packaging requirements
- echo "Installing packaging requirements..."
script:
- echo "Packaging for BinTray..."
- ./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION deb
deploy:
- provider: bintray
skip_cleanup: true
file: dist/.bintray-deb.json
on:
all_branches: true
user: mohierf
key:
secure: "pwOIRVNK+59vT9AxDsXUwydoXha3GyMbMqDOmp+O8HvLuS+FTOTtufP9ktPcZ9Tr8jY+fp3F6woECNOSECFX9WBMfcw1GwJ1Zb/ELrqbNTmZsnNeNAfT8FCcItiySWWMzO20V9OWcPv+JoWTZ/nUKhhSfCx5E8K1v4MfjpRiY9Vet4lymHnTgsEKR4/aKX0YtXb6ONO0ccklolqScmgv1V3U+K8b+94avhlc3bTQ8MGVXZuWutqKtRiyT4hAR4OCoauW2Sjz2ZqpDFHCv2PjAqrV5HteLW5aq0afH6eolm48W8SqCLGNkL24ieuVRp54iZyo9+991jWYcyL8Ozgsn25kAYa3VhlC/umokK5S6wCbb1kqAUJo2fdw8PwDexnY6Bhb/5hRqjx8lQ8prElukoPIBpUEIjsxyk3/cVvryGZnTBmg94QWlnldTOwoSDCW1FxChefgUNsAZrciFvubbOayeI93kNAgq9qkWXpSg6Bb4YszEwXMyNP5RAaEmkHFIfNBkvEZEPjuHIGXx0w172xCkMUU/eR4Ud48l4KKaQ4GNDwL+egoA/uzyR6pW1Tnfx2JxkQviQ4T/u2N4ulD3HuwXiPnEQVeMvMMbAg4CoiCLNYWheforJ1a9Gcwa+7MBGMuMNrSgQKb+tSN1UHJvoGOJoi+YugDOz5mBuOC5I8="
- stage: RPM packaging - Python 2
python: 2.7
if: (tag IS blank)
install:
# Install packaging requirements
- echo "Installing packaging requirements..."
- sudo apt-get install -y rpm
script:
- echo "Packaging for BinTray..."
- ./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION rpm
deploy:
- provider: bintray
skip_cleanup: true
file: dist/.bintray-rpm.json
on:
all_branches: true
user: mohierf
key:
secure: "pwOIRVNK+59vT9AxDsXUwydoXha3GyMbMqDOmp+O8HvLuS+FTOTtufP9ktPcZ9Tr8jY+fp3F6woECNOSECFX9WBMfcw1GwJ1Zb/ELrqbNTmZsnNeNAfT8FCcItiySWWMzO20V9OWcPv+JoWTZ/nUKhhSfCx5E8K1v4MfjpRiY9Vet4lymHnTgsEKR4/aKX0YtXb6ONO0ccklolqScmgv1V3U+K8b+94avhlc3bTQ8MGVXZuWutqKtRiyT4hAR4OCoauW2Sjz2ZqpDFHCv2PjAqrV5HteLW5aq0afH6eolm48W8SqCLGNkL24ieuVRp54iZyo9+991jWYcyL8Ozgsn25kAYa3VhlC/umokK5S6wCbb1kqAUJo2fdw8PwDexnY6Bhb/5hRqjx8lQ8prElukoPIBpUEIjsxyk3/cVvryGZnTBmg94QWlnldTOwoSDCW1FxChefgUNsAZrciFvubbOayeI93kNAgq9qkWXpSg6Bb4YszEwXMyNP5RAaEmkHFIfNBkvEZEPjuHIGXx0w172xCkMUU/eR4Ud48l4KKaQ4GNDwL+egoA/uzyR6pW1Tnfx2JxkQviQ4T/u2N4ulD3HuwXiPnEQVeMvMMbAg4CoiCLNYWheforJ1a9Gcwa+7MBGMuMNrSgQKb+tSN1UHJvoGOJoi+YugDOz5mBuOC5I8="
- stage: RPM packaging - Python 3
python: 3.6
if: (tag IS blank)
install:
# Install packaging requirements
- echo "Installing packaging requirements..."
- sudo apt-get install -y rpm
script:
- echo "Packaging for BinTray..."
- ./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION rpm
deploy:
- provider: bintray
skip_cleanup: true
file: dist/.bintray-rpm.json
on:
all_branches: true
user: mohierf
key:
secure: "pwOIRVNK+59vT9AxDsXUwydoXha3GyMbMqDOmp+O8HvLuS+FTOTtufP9ktPcZ9Tr8jY+fp3F6woECNOSECFX9WBMfcw1GwJ1Zb/ELrqbNTmZsnNeNAfT8FCcItiySWWMzO20V9OWcPv+JoWTZ/nUKhhSfCx5E8K1v4MfjpRiY9Vet4lymHnTgsEKR4/aKX0YtXb6ONO0ccklolqScmgv1V3U+K8b+94avhlc3bTQ8MGVXZuWutqKtRiyT4hAR4OCoauW2Sjz2ZqpDFHCv2PjAqrV5HteLW5aq0afH6eolm48W8SqCLGNkL24ieuVRp54iZyo9+991jWYcyL8Ozgsn25kAYa3VhlC/umokK5S6wCbb1kqAUJo2fdw8PwDexnY6Bhb/5hRqjx8lQ8prElukoPIBpUEIjsxyk3/cVvryGZnTBmg94QWlnldTOwoSDCW1FxChefgUNsAZrciFvubbOayeI93kNAgq9qkWXpSg6Bb4YszEwXMyNP5RAaEmkHFIfNBkvEZEPjuHIGXx0w172xCkMUU/eR4Ud48l4KKaQ4GNDwL+egoA/uzyR6pW1Tnfx2JxkQviQ4T/u2N4ulD3HuwXiPnEQVeMvMMbAg4CoiCLNYWheforJ1a9Gcwa+7MBGMuMNrSgQKb+tSN1UHJvoGOJoi+YugDOz5mBuOC5I8="