-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
.travis.yml
257 lines (248 loc) · 9.39 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
env:
global:
- PYFUNCEBLE_AUTO_CONFIGURATION="PyFunceble"
jobs:
include:
- stage: "Code Tests"
language: generic
os: linux
dist: bionic
name: "Code Test with Python 3.8.5 under Ubuntu 18.04 (Bionic Beaver)"
env:
- PYTHON_VERSION="3.8.5"
- TOXENV="py38"
script:
- tox --current-env
- language: generic
os: linux
dist: focal
name: "Code Test with Python 3.8.5 under Ubuntu 20.04 (Focal Fossa)"
env:
- PYTHON_VERSION="3.8.5"
- TOXENV="py38"
script:
- tox --current-env
- language: generic
os: osx
osx_image: xcode12
name: "Code Test with Python 3.8.5 under macOS 10.14 (Mojave)"
env:
- PYTHON_VERSION="3.8.5"
- TOXENV="py38"
script:
- tox --current-env
- language: generic
os: linux
dist: bionic
name: "Code Test with Python 3.7.8 under Ubuntu 18.04 (Bionic Beaver)"
env:
- PYTHON_VERSION="3.7.8"
- TOXENV="py37"
script:
- tox --current-env
- language: generic
os: linux
dist: focal
name: "Code Test with Python 3.7.8 under Ubuntu 20.04 (Focal Fossa)"
env:
- PYTHON_VERSION="3.7.8"
- TOXENV="py37"
script:
- tox --current-env
- language: generic
os: osx
osx_image: xcode12
name: "Code Test with Python 3.7.8 under macOS 10.14 (Mojave)"
env:
- PYTHON_VERSION="3.7.8"
- TOXENV="py37"
script:
- tox --current-env
- language: generic
os: linux
dist: bionic
name: "Code test with Python 3.6.11 under Ubuntu 18.04 (Bionic Beaver)"
env:
- PYTHON_VERSION="3.6.11"
- TOXENV="py36"
script:
- tox --current-env
- language: generic
os: linux
dist: focal
name: "Code test with Python 3.6.11 under Ubuntu 20.04 (Focal Fossa)"
env:
- PYTHON_VERSION="3.6.11"
- TOXENV="py36"
script:
- tox --current-env
- language: generic
os: osx
osx_image: xcode12
name: "Code test with Python 3.6.11 under macOS 10.14 (Mojave)"
env:
- PYTHON_VERSION="3.6.11"
- TOXENV="py36"
script:
- tox --current-env
- stage: "CLI (running) Tests"
language: generic
os: linux
dist: bionic
name: "Run with Python 3.8.5 under Ubuntu 18.04 (Bionic Beaver)"
env:
- PYTHON_VERSION="3.8.5"
- TOXENV="py38"
script:
- tox --current-env -c tox_run.ini
- language: generic
os: linux
dist: focal
name: "Run with Python 3.8.5 under Ubuntu 20.04 (Focal Fossa)"
env:
- PYTHON_VERSION="3.8.5"
- TOXENV="py38"
script:
- tox --current-env -c tox_run.ini
- language: generic
if: branch =~ ^dev$
os: osx
osx_image: xcode12
name: "Run with Python 3.8.5 under macOS 10.14 (Mojave)"
env:
- PYTHON_VERSION="3.8.5"
- TOXENV="py38"
script:
- tox --current-env -c tox_run.ini
- language: generic
os: linux
dist: bionic
name: "Run with Python 3.8.5 under Ubuntu 18.04 (Bionic Beaver) with MariaDB as DB Type."
env:
- PYTHON_VERSION="3.8.5"
- TOXENV="py38"
addons:
mariadb: "10.4"
before_script:
- sudo systemctl restart mysql
- sudo mysql -u root -h localhost -e "CREATE DATABASE pyfunceble DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
- sudo mysql -u root -h localhost -e "CREATE USER 'root'@'%' IDENTIFIED BY ''"
- sudo mysql -u root -h localhost -e "CREATE USER 'pyfunceble'@'localhost' IDENTIFIED BY 'pyfunceble';"
- sudo mysql -u root -h localhost -e "GRANT ALL PRIVILEGES ON pyfunceble.* TO 'pyfunceble'@'localhost';"
- mkdir -p "tests_dir"
- echo 'PYFUNCEBLE_DB_CHARSET=utf8mb4' > tests_dir/.pyfunceble-env
- echo 'PYFUNCEBLE_DB_HOST="/var/run/mysqld/mysqld.sock"' >> tests_dir/.pyfunceble-env
- echo 'PYFUNCEBLE_DB_NAME="pyfunceble"' >> tests_dir/.pyfunceble-env
- echo 'PYFUNCEBLE_DB_PASSWORD="pyfunceble"' >> tests_dir/.pyfunceble-env
- echo 'PYFUNCEBLE_DB_PORT="3306"' >> tests_dir/.pyfunceble-env
- echo 'PYFUNCEBLE_DB_USERNAME="pyfunceble"' >> tests_dir/.pyfunceble-env
script:
- tox --current-env -c tox_run_mariadb.ini
- language: generic
os: linux
dist: focal
name: "Run with Python 3.8.5 under Ubuntu 20.04 (Focal Fossa) with MariaDB (10.5) as DB Type."
env:
- PYTHON_VERSION="3.8.5"
- TOXENV="py38"
addons:
mariadb: "10.5"
before_script:
- sudo systemctl restart mysql
- sudo mysql -u root -h localhost -e "CREATE DATABASE pyfunceble DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
- sudo mysql -u root -h localhost -e "CREATE USER 'root'@'%' IDENTIFIED BY ''"
- sudo mysql -u root -h localhost -e "CREATE USER 'pyfunceble'@'localhost' IDENTIFIED BY 'pyfunceble';"
- sudo mysql -u root -h localhost -e "GRANT ALL PRIVILEGES ON pyfunceble.* TO 'pyfunceble'@'localhost';"
- mkdir -p "tests_dir"
- echo 'PYFUNCEBLE_DB_CHARSET=utf8mb4' > tests_dir/.pyfunceble-env
- echo 'PYFUNCEBLE_DB_HOST="/var/run/mysqld/mysqld.sock"' >> tests_dir/.pyfunceble-env
- echo 'PYFUNCEBLE_DB_NAME="pyfunceble"' >> tests_dir/.pyfunceble-env
- echo 'PYFUNCEBLE_DB_PASSWORD="pyfunceble"' >> tests_dir/.pyfunceble-env
- echo 'PYFUNCEBLE_DB_PORT="3306"' >> tests_dir/.pyfunceble-env
- echo 'PYFUNCEBLE_DB_USERNAME="pyfunceble"' >> tests_dir/.pyfunceble-env
script:
- tox --current-env -c tox_run_mariadb.ini
- language: generic
if: branch =~ ^dev|master$
stage: "Deployments"
os: linux
dist: bionic
name: "Deployment to PyPi"
script:
- echo "Hello, World!"
after_success:
- echo "Hello, World!"
env:
- PYTHON_VERSION="3.8.5"
deploy:
provider: pypi
user: funilrys
password:
secure: IG1FlVINvTCO7jscSz4aQMRABBcZVFGNBfDB0giAhtNV/Nr98jSyLZXETx7yquD93dFZpL58HXcPRxoa3hemyBLcTc0ATMsNBM48IrN3xaxfPytlQQn7aocKdZLAMbriCo7CO4x4O00lu3Cx2tAZtZMaDGYN+KpWIR9V+dXF1hHLj7owilko3YVXiXXamlOZmkdv28PcACQlJ7QLLYxTY3o/LuLrCOvo3zc+Ao0JfKpOv9Fm41keUS51Ek5QWXFaO7VNho6CXV7/5rJbF9w1flkM7GEUH78pjs+KpwBV7auwFYMerYPq5GVPiL117y9ojXxfF+B1qY1flreugCgSRJQKhzvfgSlgGhM93GG2yPpQu6LGIIZJ0MMcXldheY1JOzVMddXYbFTeG3j+/0a9EF47G9ZUeCiY3uCmaqaIuMvuby+Ze0XsHqrOkN+uALtgmrJuhDgiJvY1+qAIo56jBcaTYcOs+xqkFbqviltNjqriH3uFRhXZUpVQchd49eq6m+OyEu4jcYH9Pn1qHdwKBKU/KCRbYy9zAj5gso/HrSRaMrjMGUcdlzNEWKHVstnBPIq+9xnZ5Zeb7ev6i2vTH3WVHQoAFRGvNv/K7+zRMt0iDK2H9SCg3mi4v1c/JwUuY6Oht/PXwbbJ8sAIVAs+3P+FrEBIjkkbtjjPDHaA9rg=
distributions: sdist bdist_wheel
skip_existing: true
on:
all_branches: true
- language: generic
if: branch =~ ^dev|master$
os: linux
dist: bionic
name: "Deployment to Docker"
env:
- PYTHON_VERSION="3.8.5"
- DOCKER_PYTHON_VERSION="3.8"
script:
- wget https://github.com/PyFunceble/docker/archive/master.zip -O ${HOME}/master.zip
- cd ${HOME} && unzip master.zip && cd docker-master
- pip install -e .
- pyfunceble-docker-builder --version
- cd ${TRAVIS_BUILD_DIR}
- pyfunceble-docker-builder -b ${HOME}/docker-master/builder -p "$(python setup.py --name)" --pyfunceble-version="$(python setup.py --version)" --python-version="${DOCKER_PYTHON_VERSION}" --is-latest --publish --commit="$(git log -1 --format=format:'%H')"
after_success:
- echo "Hello, World!"
- language: generic
if: branch =~ ^dev|master$
os: linux
dist: bionic
name: "Deployment to Anaconda Cloud"
env:
- PYTHON_VERSION="3.8.5"
before_install:
- wget https://raw.githubusercontent.com/PyFunceble/conda-builder/master/build-and-push-it -O ${TRAVIS_BUILD_DIR}/build-and-push-it
before_script:
- export pkgVersion=$(python3 setup.py --version)
- export pkgName=$(python3 setup.py --name)
- chmod +x build-and-push-it
- export CONDA_BUILD_DIR=${TRAVIS_BUILD_DIR}
script:
- >
./build-and-push-it "${pkgName,,}" "${pkgVersion,,}"
--override-channels -c pyfunceble -c conda-forge --variants
'{"python": ["3.6", "3.7", "3.8"]}'
after_success:
- echo "Hello, World!"
install:
- export PATH="${HOME}/miniconda/bin:${PATH}"
- if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; else wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi
- bash miniconda.sh -b -p ${HOME}/miniconda
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels conda-forge
- conda update -q conda
- conda create -q -n test-environment python="${PYTHON_VERSION}"
- source activate test-environment
- python --version --version
- pip --version
- conda --version
- conda install coverage coveralls conda-forge::codacy-coverage pylint unittest2
- pip install tox-current-env
- pip install -e .
after_success:
- python-codacy-coverage -r coverage.xml
- coveralls
notifications:
email:
on_failure: always
on_success: change
recipients: