-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
60 lines (54 loc) · 1.59 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
dist: xenial
sudo: required
matrix:
include:
- os: linux
dist: xenial
language: python
python: 3.6
- os: linux
dist: xenial
language: python
python: 3.7
- os: osx
language: generic
env: PYTHON_VERSION="3.6"
- os: osx
language: generic
env: PYTHON_VERSION="3.7"
git:
depth: false
install:
# os dependencies and set up matplotlib backend
# travis does not support python on osx - install via miniconda
- |
if [ $TRAVIS_OS_NAME = 'osx' ]; then
echo "Installing brew packages..."
brew install graphviz
echo "Setting up conda environment..."
wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh || exit 1
bash miniconda.sh -b -p "$HOME/miniconda3" || exit 1
export PATH=$HOME/miniconda3/bin:$PATH
conda config --set always_yes true || exit 1
conda create -n lookml-tools python=$PYTHON_VERSION || exit 1
echo "Activating conda environment"
source activate lookml-tools
echo "Updating matplotlib configuration"
mkdir -p ~/.matplotlib && touch ~/.matplotlib/matplotlibrc
"`echo backend: TkAgg >> ~/.matplotlib/matplotlibrc`"
fi
if [ $TRAVIS_OS_NAME = 'linux' ]; then
echo "Installing linux packages"
sudo apt-get install graphviz
echo "Updating matplotlib configuration"
mkdir -p ~/.config/matplotlib && touch ~/.config/matplotlib/matplotlibrc
"`echo backend: Agg >> ~/.config/matplotlib/matplotlibrc`"
fi
echo "Installing requirements"
pip install -r requirements.txt
# command to run tests
script:
- python -m pytest test/
branches:
only:
- master