forked from conda/constructor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (68 loc) · 2.06 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
# https://travis-ci.org/conda/constructor
language: python
sudo: false
branches:
only:
- master
env:
global:
- CONSTRUCTOR_CACHE=/tmp/constructor_travis_ci
matrix:
include:
# Linux
- os: linux
language: generic
env: TRAVIS_PYTHON_VERSION=3.7 CONDA_CANARY=false CONDA_AUTO_UPDATE_CONDA=False
- os: linux
language: generic
env: TRAVIS_PYTHON_VERSION=2.7 CONDA_CANARY=false CONDA_AUTO_UPDATE_CONDA=False
- os: linux
language: generic
env: TRAVIS_PYTHON_VERSION=3.7 CONDA_CANARY=true CONDA_AUTO_UPDATE_CONDA=False
# OSX
- os: osx
language: generic
env: TRAVIS_PYTHON_VERSION=3.7 CONDA_CANARY=false CONDA_AUTO_UPDATE_CONDA=False
allow_failures:
- os: linux
language: generic
env: TRAVIS_PYTHON_VERSION=3.7 CONDA_CANARY=true CONDA_AUTO_UPDATE_CONDA=False
cache:
directories:
- $HOME/condacache/pkgs
- $HOME/.cache/pip
install:
# Install latest miniconda
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
MINICONDA_OS=Linux ;
else
MINICONDA_OS=MacOSX ;
fi ;
MINICONDA_PYVERSION=${TRAVIS_PYTHON_VERSION:0:1} ;
wget https://repo.anaconda.com/miniconda/Miniconda$MINICONDA_PYVERSION-latest-$MINICONDA_OS-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p "$HOME"/miniconda
- source "$HOME"/miniconda/bin/activate
- conda config --set always_yes yes
- conda update conda -q --no-pin
- conda config --add pkgs_dirs ~/condacache/pkgs
# Install run dependencies
- conda install pillow>=3.1 ruamel_yaml
# Install test dependencies
- conda install conda-forge::codecov pytest pytest-cov
# Install this package
- python setup.py develop
- conda init
# Install conda canary before running tests, ensure conda is updated
- if [ "${CONDA_CANARY}" = "true" ]; then
conda update conda -c conda-canary --no-pin;
else
conda update conda --no-pin;
fi
- source "$HOME"/miniconda/bin/activate
- conda info
- conda list
script:
- pytest --cov=constructor constructor
- python scripts/run_examples.py
after_success:
- codecov