forked from Lightning-AI/pytorch-lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
90 lines (77 loc) · 2.25 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
# vim ft=yaml
# After changing this file, check it on:
# http://yaml-online-parser.appspot.com/
# See doc/travis_notes.txt for some guidelines
# this file is *not* meant to cover or endorse the use of travis, but rather to
# help confirm pull requests to this project.
env:
global:
- DISPLAY=""
language: python
matrix:
include:
- dist: xenial # Ubuntu 16.04
python: 3.6
env:
- TOXENV=py36
- MIN_REQUIREMENTS=1
- dist: xenial # Ubuntu 16.04
python: 3.7
env:
- TOXENV=py37
- MIN_REQUIREMENTS=1
- dist: bionic # Ubuntu 18.04
python: 3.6
env: TOXENV=py36
- dist: bionic # Ubuntu 18.04
python: 3.7
env: TOXENV=py37
- os: osx
# https://blog.travis-ci.com/2019-08-07-extensive-python-testing-on-travis-ci
osx_image: xcode10.3
language: generic
env: TOXENV=py37
#addons:
# homebrew:
# # update: true
# packages: python3.7
before_install:
- pip3 install virtualenv
- virtualenv -p python3 ~/venv
- source ~/venv/bin/activate
# - os: windows
# language: minimal
# before_install:
# - choco install python3
# - export PATH="/c/Python37:/c/Python37/Scripts:$PATH"
# env: TOXENV=py37
# See http://docs.travis-ci.com/user/caching/#pip-cache
cache: pip
install:
- pip install future # needed for `builtins`
- sudo pip install tox
before_script:
# rewrite all minimal requirements as strict
- if [[ "${MIN_REQUIREMENTS}" == "1" ]]; then
python -c "req = open('requirements.txt').read().replace('>', '=') ; open('requirements-ci.txt', 'w').write(req)" ;
else
cp requirements.txt requirements-ci.txt ;
fi
- pip install -r requirements-ci.txt -U
script:
# integration
- tox --sitepackages
#- python setup.py install --dry-run --user
- virtualenv vEnv ;
source vEnv/bin/activate
- pip install --editable . ;
cd .. & python -c "import pytorch_lightning ; print(pytorch_lightning.__version__)"
- deactivate ;
rm -rf vEnv
after_success:
- coverage report
# disable auto coverage bc it isn't accurate since it misses gpu code.
# to get coverage, run local and push results
# - codecov
notifications:
email: false