-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
56 lines (45 loc) · 1.01 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
dist: xenial
language: python
python:
- 3.4
- 3.5
- 3.6
- 3.7
- nightly
matrix:
allow_failures:
- python: nightly
fast_finish: true
cache: pip
before_install:
# Install PyLint and PyTest
- travis_retry pip install pylint pytest pytest-cov
# Fix duplicate lines issues
- pylint --generate-rcfile > ~/.pylintrc
- sed -i "s/min-similarity-lines=.*/min-similarity-lines=50/g" ~/.pylintrc
# Fix git tag issues
- git describe --tags --long --dirty || sed -i "s/setup_requires = .*/version = '0.0.0',/g" $TRAVIS_BUILD_DIR/setup.py
install:
- travis_retry pip install -e .
script:
# Run lint
- pylint dnslink/*
- pylint example.py
# Run test
- pytest --cov=dnslink
after_script:
- |
if [[ ${TRAVIS_PYTHON_VERSION:0:3} == "3.7" ]]
then
travis_retry pip install scrutinizer-ocular
ocular
fi
deploy:
provider: pypi
skip_cleanup: true
skip_existing: true
on:
tags: true
user: $PYPI_USER
password: $PYPI_PASSWORD
distributions: "sdist bdist_wheel"