forked from pyload/pyload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
182 lines (160 loc) · 5.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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
sudo: false
os: linux
language: python
group: travis_latest
git:
depth: 3
quiet: true
submodules: false
lfs_skip_smudge: true
branches:
only:
- /^v[\d.]+/
- master
- develop
stages:
- check
- test
- name: deploy
if: repo = pyload/pyload AND branch = master
# NOTE: this must be set to latest stable python version
python: 3.7
# NOTE: this must be set to latest supported ubuntu version
dist: xenial
before_cache: rm -f "$HOME/.cache/pip/log/debug.log"
cache: pip
install: pip install --upgrade tox tox-travis
script: tox --sitepackages
jobs:
# fast_finish: true
allow_failures:
- stage: deploy
- name: Pylint Errors
- name: Bandit Errors
- python: nightly
- python: pypy3
- os: osx
- os: windows
include:
- stage: check
name: Compile Errors
script: tox -e compileall
- stage: check
name: Pylint Errors
script: tox -e pylint --sitepackages
- stage: check
name: Bandit Errors
script: tox -e bandit
- stage: test
os: linux
python: 3.6
- stage: test
os: linux
# python: $TRAVIS_PYTHON_VERSION
- stage: test
os: linux
python: nightly
- stage: test
os: linux
python: pypy3
# NOTE: work-around to test Python on OSX (not supported officially)
- stage: test
os: osx
language: sh
env:
- TOXENV=py3
- HOMEBREW_NO_INSTALL_CLEANUP=1
- HOMEBREW_NO_ANALYTICS=1
before_cache:
# - brew cleanup
- rm -f "$HOME/Library/Caches/pip/log/debug.log"
cache:
directories:
# - "$HOME/Library/Caches/Homebrew"
- "$HOME/Library/Caches/pip"
addons:
homebrew:
# update: true
packages: python3
before_install:
- python3 -m pip install --upgrade virtualenv
- virtualenv -p python3 --system-site-packages "$HOME/venv"
- source "$HOME/venv/bin/activate"
# NOTE: work-around to test Python on Windows (not supported officially)
- stage: test
os: windows
language: sh
env:
- TOXENV=py3
- PATH="/c/Python37:/c/Python37/Scripts:$PATH"
before_cache: rm -f "$LOCALAPPDATA/pip/Cache/log/debug.log"
cache:
directories: "$LOCALAPPDATA/pip/Cache"
# addons:
# chocolatey:
# update: true
# packages: python3
before_install: choco install -y python3
- stage: deploy
name: Github Release
if: tag IS present
install: pip install --upgrade Babel Jinja2 wheel
script: python setup.py sdist build_locale bdist_wheel
deploy:
provider: releases
api-key:
secure: "LDbvOV6EIV2itKUOSQE24RctMJTj7trF8eRQIMQJFa50W/fT03HpHiRVzhddUo4UadzAy5XNm5fRZY5AMNOomQk023mHwTUuPIhQDLVl1Esati7OZpekhKE1v4+sbLfVvvv+rRuDfcn+qjiZ358UU6D4SuZ4zClu6hUxnt0Qc70="
file_glob: true
file: dist/*
skip_cleanup: true
# prerelease: true
- stage: deploy
name: PyPI Release
env: PYLOAD_DEVBUILD="$TRAVIS_BUILD_NUMBER"
install: pip install --upgrade Babel Jinja2 readme_renderer[md]
script: true
deploy:
provider: pypi
user:
secure: "IDWPXbVVMr9/sZOb5/p9bXTvq//EGuzQWM4CnQOm2G4mfaX0ssr7+4w+wweJgI9UJFIcoHmvYC0cjljCleSW1j+1G3GO7whInLUuD63Vt1iA8H4UIvg4JYcTwGZQ9R/PWoW0k5MHems0picgA3cMw/9VBfl3IUraGb6+2QdxpHY="
password:
secure: "eoe3SLOEa0Z7UxJI905InCzHatdDigIBt/fl7b6kOHy76IYU3e5lZ/c6urGJBOsy+1LN6vPHvWmVVw/vhevfTd8MM6i0cGXo23zIefYAU2zkjKejWyF2/tke6spngikC1vzEyANs9fNFLXU4USCfgr1lCvuuy9Znwl/sI6jqVTg="
distributions: "sdist build_locale bdist_wheel"
# skip_cleanup: true
skip_existing: true
- stage: deploy
name: Docker Release
env:
- PYLOAD_DEVBUILD="$TRAVIS_BUILD_NUMBER"
- secure: "dtCGQHfYizfV/u3nZ9lQZcNsb2eJrvCarJaZAuerOllqlsPzfpFFVJVmDpkwaCjs8qEEvflQOPO0o/uonUKQOSmWdcQaqmtMlRZ3JZEENWXAnLJDy/lfBflrR+An47vS5oNQ9bNcLMM7GBFbOxcXFGK6zScXnS2g8erXqymN46M="
- secure: "TrWBa99CnrnJ/FYKhq20EYAhbjlLXVExQu5ScZczDYzVZYV1rLzENInyc8L7JVU1A6vSJ4lIKZ+BYMk03hSMSU8wIQPrKaKHLBfjgX6hww9gBHIdfhnM9yVhBS8NM+jwmGQBotFjiRsQVCg1Jhtd9YwpjCO6Gj4UBmNfxXt52tw="
addons:
apt:
update: true
packages: docker-ce
services: docker
install: pip install --upgrade docker-ci-deploy
before_script: docker pull pyload/pyload || true
script:
- docker build --pull --cache-from pyload/pyload:latest-ubuntu --tag pyload/pyload:ubuntu .
- docker build --file Dockerfile.alpine --pull --cache-from pyload/pyload:latest-alpine --tag pyload/pyload:alpine .
after_script: docker images
before_deploy:
- docker run pyload/pyload:ubuntu
- docker run pyload/pyload:alpine
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
deploy:
- provider: script
script:
- dcd --tag ubuntu --version "${TRAVIS_TAG#v}" pyload/pyload:ubuntu
- dcd --tag alpine --version "${TRAVIS_TAG#v}" pyload/pyload:alpine
skip_cleanup: true
on:
tags: true
- provider: script
script:
- dcd --tag latest-ubuntu -tag latest pyload/pyload:ubuntu
- dcd --tag latest-alpine pyload/pyload:alpine
skip_cleanup: true
# after_success:
# - if [ "$COVERAGE" = "true" ]; then coveralls || echo "failed"; fi