forked from snorkel-team/snorkel-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
73 lines (63 loc) · 2.75 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
# Only run CI on master, release branches, tags, and PRs
if: tag IS present OR type = pull_request OR ((branch = master OR branch =~ release-*) AND type = push)
# Main dist is Python
language: python
# Cache package wheels
cache: pip
# python3.7 only available on xenial
dist: xenial
# Set JAVA_HOME
env:
global:
- secure: "3HpKlZ72Bmljvtjrl5oSQgwBFSJ8ouEtueUwrz1bKhG2tLHnmtqmYgnfIup9YZtm++1YtcG7Q5sTR8KA1JWwnJL/OGLrAD0ddIbjv+MuGeUnsIvi5y/X5jD+rpvaPjcvbMTcJG+yPhYwlmTKYT3+gSkFYZMj83VfFKRgaazTIIyT13ZPoRENcpSScve/IAusSdlRlBt3Vp2rLlbYMu9hInKkc8Qde6vlpKyfEKPXO37EuTzszxaYr9kt7I1OHKvONI2nNry0X0+WwtpsfF3d+OVLE2z6CtbeolMvbqnFf162c34Z0OzjDpREfIfSorLhXHwuhu8josTH+Ftg+0CvEnmpFbnG3scUgzJGdEaAwB2CSd1qIxt/+gHRyL1meTAfP+eiaPtEcbciFDj+5iuV9udkNXIarKbGA/eBq8mlEXNQMeOZcHPwNpdZtI9/n8YRQGfLsQsfjOX7g22XVRi5DVrmfn9R0hkoQmGk3FXGJdPS+2bVMzmXQdMvmaZOvn79RiaQVPMQSXIE2tRlYhlDE93DzkL2Sb300JG7g6YxzBQtUUFdd1w2yipi6Mup5UouATNk/TaxVXpW6DaWVw58a552NqpIoksdPpYmmo/hCWajivXxw68Tj5OQHZ/puSQyQW17Ct9kMetVtWY68gGN3jT7i4DKaDheGDMqan0s3QM="
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
jobs:
include:
- name: "Python 3.6: tutorial tests"
python: 3.6
- name: "Python 3.7: tutorial tests"
python: 3.7
jobs:
include:
- stage: "Python 3.6: fail fast tests"
python: 3.6
install:
- pip install -U pip setuptools
- pip install -U tox==3.13.0
- tox --notest -e style
script: tox -e style
- stage: all tests
if: type = pull_request
name: "Python 3.6: affected tutorial tests"
python: 3.6
env: JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- if: type = pull_request
name: "Python 3.7: affected tutorial tests"
python: 3.7
env: JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- if: type != pull_request
name: "Python 3.6: all tutorial tests"
python: 3.6
env: ALL_ENVS=--all JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- if: type != pull_request
name: "Python 3.7: all tutorial tests + web build"
python: 3.7
env: BUILD_WEB=true ALL_ENVS=--all JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
# Install JDK8 for PySpark tests
before_install:
- sudo add-apt-repository -y ppa:openjdk-r/ppa
- sudo apt-get -qq update
- sudo apt-get install -y openjdk-8-jdk --no-install-recommends
- sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
install:
- pip install -U pip setuptools
- pip install -U tox==3.13.0
- python scripts/get_tox_envs.py --plan $ALL_ENVS
- tox --notest -e $(python scripts/get_tox_envs.py $ALL_ENVS)
script:
- tox -e $(python scripts/get_tox_envs.py $ALL_ENVS)
after_success:
- if [[ ${BUILD_WEB} == "true" ]] && [[ ${TRAVIS_BRANCH} == "master" ]]; then
echo "Deploying tutorials";
bash ./scripts/push-tutorials.sh;
fi