Skip to content

Commit 9baf805

Browse files
author
Manuel
committed
Update CI/CD
- adapt appveyor and make travis deploy to pypi - add codecov bot to comment on pull requests
1 parent 3958508 commit 9baf805

File tree

6 files changed

+151
-69
lines changed

6 files changed

+151
-69
lines changed

.appveyor.yml

+76-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,82 @@
1-
version: 1.0.{build}
2-
31
environment:
2+
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
3+
# /E:ON and /V:ON options are not enabled in the batch script intepreter
4+
# See: http://stackoverflow.com/a/13751649/163740
5+
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
6+
# TOX_ENV: "pywin"
7+
48
matrix:
5-
- PYTHON: "C:\\Python36-x64"
9+
# - PYTHON: "C:\\Python35-x64"
10+
# PYTHON_VERSION: '3.5'
11+
# PYTHON_ARCH: '64'
12+
# TOXENV: "py35"
13+
# # PYTHON_HOME: C:\Python35
14+
# # TOXPYTHON: C:\Python35-x64\python.exe
15+
16+
# - PYTHON: "C:\\Python36-x64"
17+
# PYTHON_VERSION: '3.6'
18+
# PYTHON_ARCH: '64'
19+
# TOXENV: "py36"
20+
# # PYTHON_HOME: C:\Python36
21+
# # TOXPYTHON: C:\Python36-x64\python.exe
22+
23+
- PYTHON: "C:\\Python37-x64"
24+
PYTHON_VERSION: '3.7'
25+
PYTHON_ARCH: '64'
26+
TOXENV: "py37"
27+
# PYTHON_HOME: C:\Python37
28+
# TOXPYTHON: C:\Python37-x64\python.exe
29+
30+
- PYTHON: "C:\\Python37-x64"
31+
PYTHON_VERSION: '3.7'
32+
PYTHON_ARCH: '64'
33+
TOXENV: "docu"
34+
35+
# - PYTHON: "C:\\Python37-x64"
36+
# PYTHON_VERSION: '3.7'
37+
# PYTHON_ARCH: '64'
38+
# TOXENV: "example_scripts"
39+
# PYTHON_HOME: C:\Python37
40+
# TOXPYTHON: C:\Python37-x64\python.exe
41+
42+
43+
init:
44+
- ps: echo $env:TOXENV
45+
- ps: echo $env:PYTHON_HOME
46+
- ps: ls C:\Python*
647

748
install:
8-
- cmd: "%PYTHON%\\python.exe setup.py install"
9-
- cmd: "%PYTHON%/Scripts/pip.exe install numpy"
10-
- cmd: "%PYTHON%/Scripts/pip.exe install -r requirements.txt"
11-
- cmd: "%PYTHON%\\python.exe install_resources.py omssa_2_1_9"
12-
- cmd: "%PYTHON%/Scripts/nosetests.exe"
49+
# - python -u ci\appveyor-bootstrap.py
50+
# Download setup scripts and unzip
51+
- ps: "wget https://github.com/cloudify-cosmo/appveyor-utils/archive/master.zip -OutFile ./master.zip"
52+
- "7z e master.zip */appveyor/* -oappveyor"
53+
54+
# Install Python (from the official .msi of http://python.org) and pip when
55+
# not already installed.
56+
- "powershell ./appveyor/install.ps1"
57+
58+
# Prepend newly installed Python to the PATH of this build (this cannot be
59+
# done from inside the powershell script as it would require to restart
60+
# the parent CMD process).
61+
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
62+
63+
# Check that we have the expected version and architecture for Python
64+
- "python --version"
65+
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
66+
67+
68+
build: false # Not a C# project, build stuff at the test step instead.
69+
70+
before_test:
71+
- "%CMD_IN_ENV% pip install tox"
72+
- ps: 'ls C:\Python35\Scripts'
73+
74+
test_script:
75+
- "%CMD_IN_ENV% tox -e %TOXENV%"
1376

14-
# test_script:
15-
# - nosetests
77+
# on_failure:
78+
# - ps: dir "env:"
79+
# - ps: get-content .tox\*\log\*
1680

17-
build: off
81+
artifacts:
82+
- path: dist\*

.travis.yml

+26-31
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,31 @@
11
language: python
22
python:
3-
- "3.6"
3+
- '3.6'
44
sudo: false
5-
6-
branches:
7-
only:
8-
- master
9-
105
matrix:
116
include:
12-
- python: 3.5
13-
env: TOXENV=py35
14-
- python: 3.6
15-
env: TOXENV=py36
16-
- python: 3.7
17-
env: TOXENV=py37
18-
dist: xenial
19-
- python: 3.6
20-
env: TOXENV=docu
21-
- python: 3.6
22-
env: TOXENV=example_scripts
23-
24-
25-
script:
26-
- tox
27-
- |
28-
if [[ $TRAVIS_TAG ]]; then
29-
# upload package to pypi
30-
python setup.py sdist
31-
python setup.py bdist_wheel --universal
32-
pip install twine
33-
twine upload --repository-url https://test.pypi.org/legacy/ -u $TWINE_USERNAMEE -p $TWINE_TEST_PASSWORD dist/*
34-
twine upload -u $TWINE_USERNAME -p $TWINE_PASSWORD dist/*
35-
# upload docu
36-
fi
7+
- python: 3.5
8+
env: TOXENV=py35
9+
- python: 3.6
10+
env: TOXENV=py36
11+
- python: 3.7
12+
env: TOXENV=py37
13+
dist: xenial
14+
- python: 3.6
15+
env: TOXENV=docu
16+
- python: 3.6
17+
env: TOXENV=coverage
18+
- python: 3.6
19+
env: TOXENV=example_scripts
20+
script: tox
21+
deploy:
22+
provider: pypi
23+
user: pyratez
24+
password:
25+
secure: "HeCtDqHQzZMn7ccPFpq4WgtxlIaSYu2ZfluMDXZFz+ybkFqA5KgA2vm9YSooYlNtFwy3VyUvMkGIKA3uHgiqNRe6rXxHVRsLk7ny4ImYz5Y7jUUHEi+XC0FwgANqt2bpqpAcE7imacFKnPknrWA8ZZYRx8Vb+d5YDkBB/J7P19xCDlkxUHIi3pi/lvgR6wBtiSqRq1jWTaaT69GkwiFZ9LjdxsUZYg6NwXM0SodV+11f9vGuelSRN9TjuxEjEQAS2mb3dupn99MG9v+Bka1kv6StlOjPfGtPO9s32kSNwyE8NQBWa6rlI5OWTwzT/UHJTViZ44owLiGdlRz+8H7HsbZZhF1Dq580Ql8d2taPv/ZzacfWfiHAW5ZR6J0LabsGzKQWbs4P9nFBDGf/O1VxneFXxOVswYcMYoJ3GzP48gtLSUnTX6WkyZDJfHPjih25AD0GetWRYa2rx984uyTgjdoPdYdzn1CJEIAIR2UstZz9e1sNRsB96PG1/UADiKQZYAT96c64TzyDn4PPzqbUSOYLtptROTYLwFMFfCf7ymKWs0ZJ4EwETwGArg6c5F9DeQwTnHNXgzD4yaNjqgkGHl+jabeKZdJnh41Bkzjt9lPwj6EWEIx7PBVsadjTmwI2+i9qq2B8euk/IQKu7F7APx/tjhhet48bTL7cWuf5mJA="
26+
distributions: sdist bdist_wheel bdist_egg
27+
on:
28+
tags: true
29+
all_branches: true
30+
skip_existing: true
31+
skip_cleanup: true

codecov.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
codecov:
2+
notify:
3+
require_ci_to_pass: yes
4+
coverage:
5+
precision: 2
6+
round: down
7+
range: "70...100"
8+
9+
status:
10+
project: yes
11+
patch: yes
12+
changes: no
13+
14+
parsers:
15+
gcov:
16+
branch_detection:
17+
conditional: True
18+
loop: True
19+
method: False
20+
changes: False
21+
macro: False
22+
23+
comment:
24+
layout: "head, diff"
25+
behaviour: default
26+
require_change: no

requirements.txt

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
pymzml>=2.0
2-
nose>=1.3
1+
pymzml >= 2.0
2+
nose >=1.3
33
regex
4-
pyahocorasick>=1.1.4; sys_platform != 'win32'
5-
pyqms
4+
pyahocorasick >= 1.1.4; sys_platform != 'win32'
5+
pyqms==0.6.2
6+
coverage
7+
codecov
68
tox
9+
pre-commit

requirements_dev.txt

-4
This file was deleted.

tox.ini

+16-19
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
[tox]
2-
envlist=py35,py36,py37,docu,example_scripts
3-
requires= tox
2+
envlist=py35,py36,py37,coverage,docu
3+
44
[testenv]
55
deps =
6-
-Ur{toxinidir}/requirements_dev.txt
6+
-Ur{toxinidir}/requirements.txt
77
commands =
8-
coverage erase
9-
coverage run {envbindir}/nosetests
10-
coverage report --include=ursgal/* --omit=test/
11-
codecov
8+
nosetests
129

1310
[testenv:docu]
1411
deps =
@@ -18,15 +15,15 @@ commands =
1815
make latex
1916
make html
2017

21-
[testenv:example_scripts]
22-
deps =
23-
-Ur{toxinidir}/requirements.txt
24-
changedir = {toxinidir}/example_scripts
25-
commands =
26-
# selected example_scripts here
27-
python filter_csv_validation_example.py
28-
python filter_csv_for_mods_example.py
29-
30-
[testenv:pycodestyle]
31-
commands =
32-
pycodestyle ursgal
18+
[testenv:coverage]
19+
passenv =
20+
CI TRAVIS TRAVIS_*
21+
deps =
22+
numpy
23+
commands =
24+
pip install -e .
25+
pip install -q -r {toxinidir}/requirements.txt
26+
coverage erase
27+
coverage run {envbindir}/nosetests
28+
coverage report --include=ursgal/* --omit=test/
29+
codecov

0 commit comments

Comments
 (0)