-
Notifications
You must be signed in to change notification settings - Fork 22
/
.travis.yml
92 lines (71 loc) · 2.18 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
env:
global:
- ENCRYPTION_LABEL: "d39830e202a7"
- COMMIT_AUTHOR_EMAIL: "[email protected]"
- COVERALLS_REPO_TOKEN: BqZgXuuUyZETG73TMZwGwbqqh3HXK7HBC
language: python
python: 3.5
sudo: required
dist: trusty
os:
- linux
- osx
matrix:
exclude:
- python: 3.5
include:
- os: linux
python: 2.7
- os: linux
python: 3.4
- os: linux
python: 3.5
env:
- DEPLOY_DOC=yes
- RUN_COVERAGE=yes
- PYPI_SDIST=yes
- os: linux
python: 3.6
- os: linux
python: nightly
before_install:
# - cat /etc/hosts
# - sudo hostname "$(hostname | cut -c1-63)"
# - sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts > /tmp/hosts
# - sudo mv /tmp/hosts /etc/hosts
# - cat /etc/hosts
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" && "$PY" == "3" ]]; then brew install python$PY_SUFFIX; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
virtualenv venv -p python$PY_SUFFIX;
source venv/bin/activate;
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get update;
sudo apt-get install python$( python -c 'import sys; print("%d.%d" % sys.version_info[:2])' )-dev || true;
fi
- pip install -U pip setuptools wheel
- pip install -r requirement.txt
install:
- pip install -ve .
script: if [[ "$RUN_COVERAGE" == "yes" ]]; then
coverage run --source khayyam $(which nosetests);
else nosetests;
fi
after_success: if [[ "$RUN_COVERAGE" == "yes" ]]; then travis_retry coveralls ; fi
deploy:
provider: pypi
user: Vahid.Mardani
password:
secure: "R1///eV2H4wsIpXDkTeMJFdFyipLc+vMDVF/wSs6L0Z0TSQOlspsxCayagpIDIUuiXm4hgx5u3UmLlA/7YjSkabdiYGZqgKs8EiksQtSxiAF5qQRI90IWDbZOR6pujIZ44Y/cMZdxvXUUQ533PW4hHixqCwkrTE5971K11mmzGM="
skip_cleanup: true
overwrite: true
distributions: bdist_wheel
on:
tags: true
all_branches: true
repo: pylover/khayyam
condition: "$TRAVIS_TAG =~ ^v[0-9][.][0-9]*[.][0-9]*$"
after_deploy:
- if [[ "$PYPI_SDIST" == "yes" ]]; then python3 setup.py sdist upload; fi
- if [[ "$DEPLOY_DOC" == "yes" ]]; then ./travis-gh-pages.sh ; fi