-
Notifications
You must be signed in to change notification settings - Fork 100
/
.travis.yml
88 lines (82 loc) · 2.65 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
dist: xenial
language: python
cache: pip
python:
- 3.7 # Default
- 3.6
env:
global:
- KERAS="true"
matrix:
- KERAS="false"
- KERAS_VERSION="2.2.5" TENSORFLOW_VERSION="1.13.1"
- KERAS_VERSION="2.2.5" TENSORFLOW_VERSION="1.14.0"
# - KERAS_VERSION="2.2.5" TENSORFLOW_VERSION="2.0.0"
- KERAS_VERSION="2.3.0" TENSORFLOW_VERSION="1.13.1"
- KERAS_VERSION="2.3.0" TENSORFLOW_VERSION="1.14.0"
# - KERAS_VERSION="2.3.0" TENSORFLOW_VERSION="2.0.0"
matrix:
fast_finish: true
include:
# - python: 3.7
# env: KERAS="true"
# - python: 3.6
# env: KERAS="true"
- name: "Code Style (Black/Flake8)"
env: KERAS="false"
install:
- pip install black
- pip install flake8
script:
# Black code style
- black --check --diff hyperparameter_hunter tests examples setup.py
# Stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E901,E999,F821,F822,F823 --ignore=E266 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --ignore=E266 --statistics
after_success: skip
exclude:
- env: KERAS="true"
allow_failures:
- python: 3.7
env: KERAS_VERSION="2.3.0" TENSORFLOW_VERSION="1.13.1"
- python: 3.7
env: KERAS_VERSION="2.3.0" TENSORFLOW_VERSION="1.14.0"
- python: 3.6
env: KERAS_VERSION="2.3.0" TENSORFLOW_VERSION="1.13.1"
- python: 3.6
env: KERAS_VERSION="2.3.0" TENSORFLOW_VERSION="1.14.0"
before_install:
- pip install -U pip
- pip install -r requirements.txt
install:
# Install Keras/TensorFlow for Keras-enabled Travis jobs
- |
if [[ "$KERAS" == "true" ]]; then
# Install specific Keras version if specified
if [[ -n "$KERAS_VERSION" ]]; then
pip install keras=="$KERAS_VERSION";
else
pip install keras;
fi
# Install specific TensorFlow version if specified
if [[ -n "$TENSORFLOW_VERSION" ]]; then
pip install tensorflow=="$TENSORFLOW_VERSION";
else
pip install tensorflow;
fi
fi
script:
- make test
after_success:
# Combine coverage reports from Travis jobs
- coverage combine
# Tell Coveralls to wait for all results before merging
- COVERALLS_PARALLEL=true coveralls
# Send reports to Codecov. It automatically handles merging coverage results
- codecov
notifications:
webhooks:
urls:
# Tell Coveralls it's ok to merge now (https://docs.coveralls.io/parallel-build-webhook)
- https://coveralls.io/webhook