forked from scrapinghub/shub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (78 loc) · 2.36 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
language: python
python: 3.5
sudo: false
env:
- TOX_ENV=py27
- TOX_ENV=py34
- TOX_ENV=py35
- TOX_ENV=freeze
matrix:
include:
- python: 3.3
env: TOX_ENV=py33
- python: 3.6
env: TOX_ENV=py36
- os: osx
# Using "generic" because osx in Travis doesn't support python
language: generic
env:
- TOX_ENV=py27
- PYTHON_VERSION='2.7'
- os: osx
language: generic
env:
- TOX_ENV=py35
- PYTHON_VERSION='3.5.4'
- os: osx
language: generic
env:
- TOX_ENV=py36
- PYTHON_VERSION='3.6.3'
branches:
only:
- master
- /^v\d+\.\d+\.\d+[\w\-]*$/
before_install: |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# From https://pythonhosted.org/CodeChat/.travis.yml.html
brew install pyenv-virtualenv
pyenv install $PYTHON_VERSION
export PYENV_VERSION=$PYTHON_VERSION
export PATH="/Users/travis/.pyenv/shims:${PATH}"
pyenv-virtualenv venv
source venv/bin/activate
# A manual check that the correct version of Python is running.
python --version
pip install -U pip
fi
install:
# FIXME pin virtualenv to provide tests support for python 3.3,
# should be removed after dropping support of python 3.3 in shub
- pip install -U tox twine wheel codecov virtualenv==15.2.0
script: tox -e $TOX_ENV
after_success:
- codecov
before_deploy:
- if [ $TOX_ENV == freeze ]; then tar -czf dist_bin/shub-${TRAVIS_TAG}-${TRAVIS_OS_NAME}-x64.tar.gz -C dist_bin shub; fi
deploy:
- provider: pypi
distributions: sdist bdist_wheel
user: scrapinghub
password:
secure: CJWIRI51KvqZrkPf7At1li+bbAZ/pN3iWRUPy0JaKWAC8O8B+GljXQxiXisPyLL1pIikcfLYZScOsKEhE+Uon/beeL1TPimVU3ELr7GYzuIkl3eK7quFUOiJ7glEggA5UyGNmk6goMVgaBQEOwT3gwH2LYwd1uFRvQsgIPY+tks=
skip_cleanup: true
on:
tags: true
all_branches: true
repo: scrapinghub/shub
condition: "$TRAVIS_OS_NAME == linux && $TOX_ENV == py35"
- provider: releases
api_key:
secure: JE86/LwMlkUdLXhNe3bmVQPBo9tSDXDOfIM5q8oEmkKOPymQX/dahqw5T7GCQYZUK5M9a1hVeE4ano9xb6xBX2dxVkzBunPMQMaO/UZWtP5rxsmBMr0YLOERfuWeHBDlgW7gUILZYIa7V/Z0EsnAlpSZk5nJsYW/IlmXXWKNTL0=
file: dist_bin/shub-${TRAVIS_TAG}-${TRAVIS_OS_NAME}-x64.tar.gz
skip_cleanup: true
draft: true
on:
tags: true
repo: scrapinghub/shub
condition: "$TOX_ENV == freeze"