forked from mlflow/mlflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (105 loc) · 4 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
language: python
dist: trusty
services:
- docker
matrix:
include:
- stage: small
- language: python
name: "Lint (Python 3.6)"
python: 3.6
install:
- INSTALL_SMALL_PYTHON_DEPS=true INSTALL_LARGE_PYTHON_DEPS=true source ./travis/install-common-deps.sh
- pip install -r ./travis/lint-requirements.txt
script:
- ./lint.sh
- language: python
python: 2.7
install:
- INSTALL_SMALL_PYTHON_DEPS=true source ./travis/install-common-deps.sh
script:
- ./travis/run-small-python-tests.sh
- os: windows
name: "Windows"
language: sh
before_install:
- cinst -y python3
install:
- export PATH="/c/Python37:/c/Python37/Scripts:$PATH"
- pip install -r dev-requirements.txt
- pip install -r travis/small-requirements.txt
- pip install -e .
script:
- pytest --verbose --ignore=tests/h2o --ignore=tests/keras --ignore=tests/pytorch --ignore=tests/pyfunc --ignore=tests/sagemaker --ignore=tests/sklearn --ignore=tests/spark --ignore=tests/tensorflow --ignore tests/azureml --ignore tests/onnx --ignore tests/projects tests
- language: r
name: "R"
cache: packages
before_install:
# cache packages dramatically decreases build time, but it must not include mlflow
- rm -rf /home/travis/R/Library/mlflow
- export NOT_CRAN=true
- cd mlflow/R/mlflow
- Rscript -e 'install.packages("devtools")'
- Rscript -e 'devtools::install_deps(dependencies = TRUE, upgrade = "always")'
- cd ../../..
install:
- source ./travis/install-common-deps.sh
script:
- cd mlflow/R/mlflow
# Building the package here populates the /home/travis/R/Library cache,
# and is also used when python forks into R (e.g., rfunc via models CLI).
- R CMD build .
- R CMD check --no-build-vignettes --no-manual --no-tests mlflow*tar.gz
- export LINTR_COMMENT_BOT=false
- cd tests
- Rscript ../.travis.R
after_success:
- export COVR_RUNNING=true
- Rscript -e 'covr::codecov()'
after_failure:
- "[ -r /home/travis/build/mlflow/mlflow/mlflow/R/mlflow/mlflow.Rcheck/00check.log ] && cat /home/travis/build/mlflow/mlflow/mlflow/R/mlflow/mlflow.Rcheck/00check.log"
- language: java
name: "Java"
install:
- source ./travis/install-common-deps.sh
script:
- cd mlflow/java
- mvn clean package -q
- language: node_js
node_js:
- "node" # Use latest NodeJS: https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#specifying-nodejs-versions
install:
name: "Node.js"
script:
- cd mlflow/server/js
- npm i
- ./lint.sh
- npm test -- --coverage
- stage: large
- language: python
python: 2.7
install:
- INSTALL_LARGE_PYTHON_DEPS=true source ./travis/install-common-deps.sh
script:
- ./travis/run-large-python-tests.sh
# Travis runs an extra top-level job for each build stage - depending on the build stage, we either
# run small or large Python tests below.
install:
- echo "Build stage $TRAVIS_BUILD_STAGE_NAME"
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
echo "skipping this step on windows.";
elif [[ "$TRAVIS_BUILD_STAGE_NAME" == "Small" ]]; then
INSTALL_SMALL_PYTHON_DEPS=true source ./travis/install-common-deps.sh &&
wget https://github.com/google/protobuf/releases/download/v3.6.0/protoc-3.6.0-linux-x86_64.zip -O /travis-install/protoc.zip &&
sudo unzip /travis-install/protoc.zip -d /usr;
else
INSTALL_LARGE_PYTHON_DEPS=true source ./travis/install-common-deps.sh;
fi
script:
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
echo "skipping this step on windows.";
elif [[ "$TRAVIS_BUILD_STAGE_NAME" == "Small" ]]; then
./travis/run-small-python-tests.sh && ./test-generate-protos.sh;
else
./travis/run-large-python-tests.sh;
fi