-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
86 lines (76 loc) · 2.59 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
os: linux
dist: xenial
language: python
cache:
directories:
- $HOME/.cache/pip
python:
- 3.7
- 3.8
env:
global:
- INSTALL=pip
- CHECK=test
jobs:
- INSTALL=pip
- INSTALL=install
- INSTALL=develop
- INSTALL=sdist
- INSTALL=wheel
jobs:
include:
- python: 3.7
env: CHECK=style
before_install:
- travis_retry python -m pip install --upgrade pip setuptools wheel twine
- |
if [ "$INSTALL" = "sdist" ]; then
python setup.py sdist
twine check dist/niflow-manager*.tar.gz
elif [ "$INSTALL" = "wheel" ]; then
python setup.py bdist_wheel
twine check dist/niflow_manager*.whl
fi
install:
- |
if [ "$INSTALL" = "pip" ]; then
pip install ".[test]"
elif [ "$INSTALL" = "install" ]; then
python setup.py install
elif [ "$INSTALL" = "develop" ]; then
python setup.py develop
elif [ "$INSTALL" = "sdist" ]; then
pip install "$( ls dist/niflow-manager*.tar.gz )[test]"
elif [ "$INSTALL" = "wheel" ]; then
pip install "$( ls dist/niflow_manager*.whl )[test]"
fi
- nfm --help # Verify basic operation without test packages
before_script:
- |
if [ "$CHECK" = "style" ]; then
pip install black
elif [ "$CHECK" = "test" ]; then
pip install pytest-cov coverage codecov
fi
script:
- |
if [ "$CHECK" = "style" ]; then
black --check --exclude templates/python setup.py niflow_manager
elif [ "$CHECK" = "test" ]; then
py.test -v -s --cov niflow_manager --cov-config setup.cfg --cov-report xml:cov.xml --doctest-modules niflow_manager
fi
after_script:
- |
if [ "$CHECK" = "test" ]; then
codecov --file cov.xml --flags unittests -e TRAVIS_JOB_NUMBER
fi
deploy:
- provider: pypi
username: "__token__"
password:
secure: UaZXiP89K+hN5cPZgJkqw4bTm+kobw5Go4GN0jA25gocoqLIQkj8t4LKsUii6VtUC4L0ux2RHTgQlyr97TZ7sQM5kbJMfEn/G0DDpDP3WgpCcRBbJayrDloVLclMj87Y9VrV0dt2/P0smDH3abzEr6PKaPZ9Pr2spTEfF03mRvmRPNAKkJIEO01NDBXqPN2VlGLsdmattVhiAXzW2GzMlMBLqqRlCGjB2rLNG9wPeu219WJq46EEgIjYLAcU/oORKlnn0lSOTH5pMTuuudmymCZ+vqWF23S+9x8d80jlsIBkQQjPCi+0ULnvQq2j5DRN+WXjDNn5pkH04GHyMTt80ZZzybvVrKbQfChgI4CqD8nPIiwxT2U9V0R860SLnKmfs+K1tRnSfWvtnJ5ykmyg0l1EKSHLlJ3Z38cBYOHDu0jJGeLIzXIbmI8GmaftOjcEzxcU90eB2jCrHZclNS4VHaFS4+RUv7FcYUMKN5Ikwr//EbDNnWWH+yI9Hic+67XkEsS6vyeJR0fk4aYs/2so6r+auEcgTAt4SoliN5NNnobXEeVHR3WJPWcZj41v/IWpSS6ocBU74RuXk2zVjlD7EsdyK3QmbDvKaY8m55kOVDzWuyrbBi6+VjPyM46dbsLbsZeQ6V9u/k0xEkERFX07ntDoU29KksY+JrhJgCII7oQ=
distributions: sdist bdist_wheel
skip_existing: true
edge: true
on:
tags: true