forked from roocs/clisops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
145 lines (137 loc) · 4.38 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
language: python
os: linux
dist: xenial
branches:
only:
- master
# - ^v[0-9]+\.[0-9]+[\.]?[a-c-]?[0-9]?[\w-]+\b
jobs:
fast_finish: true
include:
# - env:
# - TOXENV=docs
# - READTHEDOCS=true
# name: "Documentation"
# python: 3.6
# addons:
# apt:
# packages:
# - pandoc
# - env: TOXENV=black
# name: "Black and flake8 compliance"
# python: 3.6
# - env: TOXENV=py38
# name: "Python3.8 (Linux)"
# python: 3.8
- if: type=push
env: TOXENV=py38-anaconda
name: "Python3.8 (Linux + Anaconda)"
python: 3.8
before_install:
- printenv
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda install setuptools
- conda update -q conda
- conda create -n clisops -c conda-forge python=$TRAVIS_PYTHON_VERSION
- source activate clisops
# The following is a workaround until roocs-utils has a package on conda-forge
# - conda install -c conda-forge conda-merge
# - mv environment.yml clisops_environment.yml
# - bash -c "curl -L $ROOCS_UTILS_ENV -o roocs_utils_environment.yml"
# - conda-merge roocs_utils_environment.yml clisops_environment.yml > environment.yml
# end of workaround
- conda env update -f environment.yml
- conda install pytest coveralls pytest-cov
install:
- conda install pip
- pip install -e .
script:
- py.test --cov clisops
- if: type=push
env:
- TOXENV=py37-windows
- DESIRED_PYTHON=3.7
- MINICONDA_PATH=$(cygpath --windows /c/miniconda)
# - ROOCS_UTILS_ENV="https://github.com/roocs/roocs-utils/raw/master/environment.yml"
name: "Python3.7 (Windows + Anaconda via Chocolatey)"
os: windows
language: shell
before_install:
- printenv
- choco install miniconda3 --params="'/AddToPath:0 /D:$MINICONDA_PATH'"
- source /c/miniconda/Scripts/activate
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda install setuptools
- conda update -q conda
- conda create -n clisops -c conda-forge python=$DESIRED_PYTHON
- source activate clisops
# The following is a workaround until roocs-utils has a package on conda-forge
# - conda install -c conda-forge conda-merge
# - mv environment.yml clisops_environment.yml
# - bash -c "curl -L $ROOCS_UTILS_ENV -o roocs_utils_environment.yml"
# - conda-merge roocs_utils_environment.yml clisops_environment.yml > environment.yml
# end of workaround
- conda env update -f environment.yml
- conda install pytest coveralls pytest-cov
install:
- conda install pip
- pip install -e .
script:
- py.test --cov=xclim
- if: type = push
env: TOXENV=macOS
name: "Python3.x (macOS + Homebrew)"
os: osx
language: shell
addons:
homebrew:
update: true
packages:
- netcdf
before_install:
- printenv
install:
- /usr/local/opt/[email protected]/bin/pip3 install -U tox-travis
# - env: TOXENV=py37
# name: "Python3.7 (Linux)"
# python: 3.7
# - env: TOXENV=py36
# name: "Python3.6 (Linux)"
# python: 3.6
allow_failures:
- env: TOXENV=macOS
- env:
- TOXENV=py38-anaconda
# - ROOCS_UTILS_ENV="https://github.com/roocs/roocs-utils/raw/master/environment.yml"
- env:
- TOXENV=py37-windows
- DESIRED_PYTHON=3.7
- MINICONDA_PATH=$(cygpath --windows /c/miniconda)
before_install:
- printenv
- pip install --upgrade pip
install:
- pip install -U tox-travis
script: tox -e $TOXENV
# before_deploy:
# - echo "$TRAVIS_TAG" "$TRAVIS_COMMIT"
#
# deploy:
# skip_existing: true
# provider: pypi
# distributions: sdist bdist_wheel
# username: <username>
# password:
# secure: <secret_password>
# on:
# tags: true
# all_branches: true
# condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+[\.]?[a-c-]?[0-9]?[\w-]+\b
# repo: Ouranosinc/clisops
# python: 3.7