-
Notifications
You must be signed in to change notification settings - Fork 83
/
.travis.yml
91 lines (91 loc) · 3.73 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
dist: xenial
language: python
python:
- "3.6"
env:
global:
# to break out a new category, add "$prefix" here
# and add a line below with NOTEBOOK_CATEGORY="$prefix" TEST_CASES="test/test_notebooks.py"
- ALL_NOTEBOOK_CATEGORIES="demo_ docs_ talk_"
jobs:
- SETUP_TARGET=.[test] TEST_CASES="test/test_core_operators.py"
- SETUP_TARGET=.[full,test] TEST_CASES="test/test_core_classifiers.py"
- SETUP_TARGET=.[full,test] TEST_CASES="test/test_lale_lib_versions.py"
- SETUP_TARGET=.[full,test] TEST_CASES="test/test_core_regressors.py"
- SETUP_TARGET=.[full,test] TEST_CASES="test/test_core_pipeline.py test/test_custom_schemas.py test/test_json_pretty_viz.py test/test_grammar.py"
- SETUP_TARGET=.[full,test] TEST_CASES="test/test_type_checking.py"
- SETUP_TARGET=.[full,test] TEST_CASES="test/test_interoperability.py"
- SETUP_TARGET=.[full,test] TEST_CASES="test/test_optimizers.py"
- SETUP_TARGET=.[full,test] TEST_CASES="test/test_pipeline.py"
- SETUP_TARGET=.[full,test] TEST_CASES="test/test_autoai_libs.py test/test_aif360.py"
- SETUP_TARGET=.[full,test] NOTEBOOK_CATEGORY="demo_" TEST_CASES="test/test_notebooks.py"
- SETUP_TARGET=.[full,test] NOTEBOOK_CATEGORY="docs_" TEST_CASES="test/test_notebooks.py"
- SETUP_TARGET=.[full,test] NOTEBOOK_CATEGORY="talk_" TEST_CASES="test/test_notebooks.py"
- SETUP_TARGET=.[full,test] TEST_CASES="test/test_notebooks.py"
- SETUP_TARGET=.[test] TEST_CASES="test/test_autoai_output_consumption.py"
- SETUP_TARGET=.[test] TEST_CASES="test/test_autogen_lib.py"
- SETUP_TARGET=.[test] TEST_CASES="test/test_snap_ml.py"
addons:
apt:
packages:
- graphviz
- swig
before_install:
- pip install -U numpy
install:
- |
if [ "z${TEST_CASES}" == z"test/test_snap_ml.py" ]; then
echo -e "${ANSI_GREEN}Installing SnapML...${ANSI_RESET}" && echo -en 'travis_fold:start:compile\\r'
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda
source "$HOME/miniconda/etc/profile.d/conda.sh"
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda config --prepend channels https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/
conda create -q --name conda-snapml-env python="3.6"
conda activate conda-snapml-env
export IBM_POWERAI_LICENSE_ACCEPT=yes
conda install pai4sk
fi
- pip install $SETUP_TARGET
- |
if [ "z${TEST_CASES}" == z"test/test_autoai_output_consumption.py" ]; then
pip install 'scikit-learn==0.20.3'
fi
- |
if [ "z${TEST_CASES}" == z"test/test_lale_lib_versions.py" ]; then
pip install 'scikit-learn==0.20.3'
pip install 'xgboost==0.90'
fi
- export PYTHONPATH=`pwd`
script:
- echo -e "${ANSI_GREEN}Running Tests...${ANSI_RESET}" && echo -en 'travis_fold:start:tests\\r'
- travis_wait 60 py.test -v --capture=tee-sys --cov-report=xml --cov=lale $TEST_CASES
- bash <(curl -s https://codecov.io/bash)
- echo -en 'travis_fold:end:tests\\r'
stages:
- static_tests
- test
- deploy
jobs:
include:
- stage: static_tests
script:
- echo -e "${ANSI_GREEN}Running pre-commit checks..${ANSI_RESET}" && echo -en 'travis_fold:start:precommit\\r'
- pre-commit run --all-files
- echo -en 'travis_fold:end:precommit\\r'
env: SETUP_TARGET=.[dev]
- stage: deploy
install: skip
script: skip
env: SETUP_TARGET=.[test]
deploy:
provider: pypi
server: https://test.pypi.org/legacy/
user: __token__
password: $PYPI_TOKEN
skip_existing: true
on:
fork: false