forked from pyload/pyload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
185 lines (161 loc) · 5.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
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
183
184
185
os: linux
language: python
group: travis_latest
git:
depth: 3
quiet: true
submodules: false
branches:
only:
- /^v[\d.]+/
- main
- develop
stages:
- Check
- Test
- name: Deploy
if: repo = pyload/pyload AND branch = main
python: 3.6
dist: bionic
env: PYCURL_SSL_LIBRARY=openssl
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:
- name: Docker Release
# - python: nightly
- python: pypy3
- os: osx
- os: windows
include:
- stage: Check
name: Compilation 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: 3.7
- stage: Test
os: linux
python: 3.8
# - 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: shell
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: shell
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"
before_install: choco install -y python3
- stage: Deploy
name: Github Release
install: pip install --upgrade Babel Jinja2 wheel
script: python setup.py sdist build_locale bdist_wheel
deploy:
provider: releases
edge: true
token:
secure: "LDbvOV6EIV2itKUOSQE24RctMJTj7trF8eRQIMQJFa50W/fT03HpHiRVzhddUo4UadzAy5XNm5fRZY5AMNOomQk023mHwTUuPIhQDLVl1Esati7OZpekhKE1v4+sbLfVvvv+rRuDfcn+qjiZ358UU6D4SuZ4zClu6hUxnt0Qc70="
file: dist/*
on:
branch: main
tags: true
- stage: Deploy
name: PyPI Release
env: PYLOAD_BUILD="$TRAVIS_BUILD_NUMBER"
install: pip install --upgrade Babel Jinja2 readme_renderer[md]
script: true
deploy:
provider: pypi
edge: true
username: "__token__"
distributions: "sdist build_locale bdist_wheel"
skip_existing: true
on:
branch: main
- stage: Deploy
name: Docker Release
env:
- PYLOAD_BUILD="$TRAVIS_BUILD_NUMBER"
- secure: "dtCGQHfYizfV/u3nZ9lQZcNsb2eJrvCarJaZAuerOllqlsPzfpFFVJVmDpkwaCjs8qEEvflQOPO0o/uonUKQOSmWdcQaqmtMlRZ3JZEENWXAnLJDy/lfBflrR+An47vS5oNQ9bNcLMM7GBFbOxcXFGK6zScXnS2g8erXqymN46M="
- secure: "TrWBa99CnrnJ/FYKhq20EYAhbjlLXVExQu5ScZczDYzVZYV1rLzENInyc8L7JVU1A6vSJ4lIKZ+BYMk03hSMSU8wIQPrKaKHLBfjgX6hww9gBHIdfhnM9yVhBS8NM+jwmGQBotFjiRsQVCg1Jhtd9YwpjCO6Gj4UBmNfxXt52tw="
addons:
apt:
update: true
packages: docker-ce
services: docker
before_install: docker --version
install: pip install --upgrade docker-ci-deploy
before_script: docker pull pyload/pyload || true
script:
- docker build --file Dockerfile --pull --cache-from pyload/pyload:ubuntu --tag pyload/pyload:ubuntu .
- docker build --file Dockerfile.armhf --pull --cache-from pyload/pyload:ubuntu-arm32v7 --tag pyload/pyload:ubuntu-arm32v7 .
- docker build --file Dockerfile.alpine --pull --cache-from pyload/pyload:alpine --tag pyload/pyload:alpine .
after_script: docker images
before_deploy:
- docker run pyload/pyload:ubuntu
- docker run pyload/pyload:ubuntu-arm32v7
- docker run pyload/pyload:alpine
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
deploy:
- provider: script
edge: true
script:
- dcd --tag ubuntu --tag latest pyload/pyload:ubuntu
- dcd --tag ubuntu-arm32v7 pyload/pyload:ubuntu-arm32v7
- dcd --tag alpine pyload/pyload:alpine
on:
branch: main
- provider: script
edge: true
script:
- dcd --tag ubuntu --version "${TRAVIS_TAG#v}" pyload/pyload:ubuntu
- dcd --tag ubuntu-arm32v7 --version "${TRAVIS_TAG#v}" pyload/pyload:ubuntu-arm32v7
- dcd --tag alpine --version "${TRAVIS_TAG#v}" pyload/pyload:alpine
on:
branch: main
tags: true
# after_success:
# - if [ "$COVERAGE" = "true" ]; then coveralls || echo "failed"; fi