forked from bontiv/iot-upnp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (99 loc) · 2.66 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
language: python
cache:
- pip
python:
- "3.4"
- "3.5"
- "3.6"
install:
- pip install --upgrade pip setuptools pytest pytest-cov
- python setup.py -q install
script:
- pytest --cov-branch --cov=./ --cov-report=xml:coverage.xml
after_success:
- bash <(curl -s https://codecov.io/bash)
branches:
only:
- master
- /^v\d+\..*/
stages:
- test
- docs
- deploy
jobs:
include:
- stage: test
name: "Code Quality"
dist: trusty
language: java
before_install:
- sudo apt-get install -qq python3 python3-pip python3-pytest pylint
install:
- pip3 install --upgrade --user pip setuptools pytest pytest-cov
- python3 setup.py -q install --user
script:
- python3 -m pytest --cov-branch --cov=./ --cov-report=xml:coverage.xml
- pylint --rcfile=.pylintrc upnp > pylint.txt || true
- sonar-scanner -Dsonar.projectVersion=$TRAVIS_TAG
addons:
sonarcloud:
organization: "bontiv-github"
token: $SONAR_TOKEN
- stage: docs
name: Documentation
install:
- python setup.py -q install
- pip install -r docs/requirements.txt
script: python setup.py build_docs
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_OAUTH_TOKEN
local-dir: build/html
on:
branch: master
- stage: docs
name: Documentation coverage
install:
- pip install -r docs/requirements.txt
script: make -C docs/ coverage
- stage: deploy
name: Deployment
script: python setup.py sdist bdist bdist_wheel
deploy:
- provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
file: "dist/*"
skip_cleanup: true
prerelease: true
on:
tags: true
condition: $TRAVIS_TAG =~ ^v.*dev.*$
- provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
file: "dist/*"
skip_cleanup: true
on:
tags: true
condition: $TRAVIS_TAG =~ ^v[0-9.]*$
- provider: pypi
distributions: "sdist bdist_wheel"
user: "bontiv"
password: $PYPI_PASSWORD
server: https://test.pypi.org/legacy/
on:
tags: true
- provider: pypi
distributions: "sdist bdist_wheel"
user: "bontiv"
password: $PYPI_PASSWORD
on:
tags: true
condition: $TRAVIS_TAG =~ ^v[0-9.]*$
if: tag IS present
before_deploy:
- python setup.py bdist
- python setup.py sdist
- python setup.py bdist_wheel