-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
53 lines (53 loc) · 2.16 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
dist: xenial
language: python
addons:
artifacts: true
python:
- '3.7'
stages:
- Tests
- Black
- Pylint
- Deploy
before_install:
- sudo apt-get install -y --no-install-recommends bc
addons:
apt:
update: true
install: &requirements
- pip install -r requirements.txt
- pip install -e .
jobs:
include:
- stage: Tests
install: *requirements
script:
- tox -e py37
after_success:
- codecov
- stage: Black
install: *requirements
script:
- echo excluding $(git config --file .gitmodules --get-regexp path | awk '{ print
$2 }')
- black --exclude $(git config --file .gitmodules --get-regexp path | awk '{ print
$2 }') --check .
- stage: Pylint
install: *requirements
script:
- pip --no-cache-dir install pylint-runner
- pylint_runner --rcfile=.pylintrc --output-format=text . | tee pylint.txt
- score=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' pylint.txt)
- if (( $(echo "$score < 8" |bc -l) )); then echo "Your Pylint score is too low, $score < 8!"; exit 1; fi
- stage: Deploy
script: skip
deploy:
provider: pypi
user: EmanueleGhelfi
password:
secure: iK0uLrbHZV17FkpcyG5f8FaC87iLlTz1AVpSu5QSoYQaU1L7Pm2YpwvJPAp0jElTNoFPuTZ07r30s6dJIzYPtqadGPbS6ETme6iThFcr/cWWRj+TAXAwFdXwwyt/B5q/iVP2l/T7v5XTyLfaDWBvoBCFv4u+WCthdDRCthKyARXW+ZHJXXOjtGLXrgC+WJUQ+UhcmZHLsOECJMfJveAkJwnvaS24SaaYw8hFtOj0Xhc+1T2FDGACOIkUO/9yxBsTX2BLCAJ3na8U7weSvM78R36whWlAFJmSDMhLfxYLPusH9WEZUEOz+zdoU6xHqLqLf8lEjgiV07b3Q9N9FbW/cOC0WuToAfa+ENijh4YwgotnFWbYtvWY2O0xXpeOQ54eerivdKrwxda9CLHz1E54UY27VWYD8ZioHufgvRsHP/XLEo6uBiG5Q81hteW/kpOgCCl/o/l60Rau1+kNXqy9uuJ5pHTTF50k0TzI41LU9ps9l3ko5driBTOFQ/CWi/7CxWus7fP9UKIyR1i38LS1LSX/RKHrcmu0vzs5gODifqRiHRaq3GaFWbhxGxWKi+xR7j4Ve89YSY0Wcy+LVc6m65ySiP0UhWO4OSCmBCwIMkOIJMnrqdU3eTHhHLpf7wy9wArX1sKvhItFslUUjH7xF8eEWCfYP/O6bKjpC8Ndv6U=
on:
tags: true
all_branches: true
# Deploy only if tag respects semantic versioning pre-pended with v (e.g. v0.1.0)
if: tag =~ /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/