forked from Ouranosinc/xclim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
145 lines (137 loc) · 4.84 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
# name: "Documentation"
# python: 3.6
# addons:
# apt:
# packages:
# - pandoc
- env: TOXENV=black
name: "Black, Flake8, Numpy-like Docstring compliance, and linting"
python: 3.6
# - env: TOXENV=py39
# name: "Python3.9 (Linux)"
# python: 3.9
- env: TOXENV=py38-doctest
name: "Python3.8 (Linux) + doctests"
python: 3.8
# - if: type = push
# env: TOXENV=macOS
# name: "Python3.x (macOS)"
# os: osx
# language: shell
# addons:
# homebrew:
# update: true
# packages:
# - netcdf
# before_install:
# - printenv
# - /usr/local/lib/python3.8/bin/pip3 install --upgrade setuptools
# - /usr/local/lib/python3.8/bin/pip3 install --upgrade pip
# 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-nosubset-lm3
name: "Python3.6 (Linux + lmoments3@master) (no subsetting)"
python: 3.6
# - if: type = push
# env: TOXENV=py36-xarray
# name: "Python3.6 (Linux + xarray@master + cftime@master)"
# python: 3.6
# - if: type = push
# env: TOXENV=py36-bottleneck
# name: "Python3.6 (Linux + bottleneck@master)"
# python: 3.6
- 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 xclim -c conda-forge python=$TRAVIS_PYTHON_VERSION
- source activate xclim
- conda env update -f environment.yml
- conda install -c conda-forge pytest coveralls pytest-cov xdoctest
install:
- conda install pip
- pip install -e .[dev]
script:
- py.test --cov=xclim
- if: type = push
env:
- TOXENV=py37-windows
- DESIRED_PYTHON=3.7
- MINICONDA_PATH=$(cygpath --windows /c/miniconda)
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 xclim -c conda-forge python=$DESIRED_PYTHON
- source activate xclim
- sed -i -e 's/clisops>=0.4.0/clisops<0.4.0/g' environment.yml # clisops >0.4.0 not supported for Windows
- conda env update -f environment.yml
- conda install -c conda-forge pytest coveralls pytest-cov xdoctest
install:
- conda install pip
- pip install -e .[dev]
script:
- py.test --cov=xclim
allow_failures:
- env: TOXENV=py38-doctest
- env: TOXENV=py38-anaconda
# - env: TOXENV=macOS
- env:
- TOXENV=py37-windows
- DESIRED_PYTHON=3.7
- MINICONDA_PATH=$(cygpath --windows /c/miniconda)
# - env: TOXENV=py36-xarray
# - env: TOXENV=py36-bottleneck
before_install:
- printenv
- pip install --upgrade pip setuptools
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: Zeitsperre
password:
secure: Fk0EFrbBumFHXWoCdTCdrsTp9lSnrksqhEbsXLYFhmfnsFtzQ9z4Uhs4sgyzNeA0VsIJ3q2RnPaSrgDXxDzguzSrm9R2tKjgSoZxrdaMKOaHwkJjkF+5DKqBUpjhGQmlLVt0u31vGBS3u8OE18cP4CxZOuPM2Dx2dnHLB9mVZAC8dlt5SBxS2HtC8J8IYilR/v4fkTt6niZPnaozsViBCiybnzyrylJsYeVhTj7p1buscw/yogZPylNV+O1Dn8GLXe7Viw3ZO5kIyEq96NMTBwpXtbgQmUClcGB6m1J+mx6wE0nh9abo69EtGOuaiCY9XqEgO7J8zZNIG2hC3Smy3+o96ltPopl3C2ZJebvM3aVqNx+GHnSkmAYw/VYtGb9Psd5IzafixTIQkBP6Qab8GGj2+iaeriLgTFqUEvxtywZZovQKHtXgPyy1kcztGSY/hygObQu4Ixvx8BjkzATfMKKkc3B8MBOeFnsxm7gn5IAhukbIh8JHTU4t2sHHJUVAbor3p7luGkZUp6ygoOuYsKNpER+cr39GLVV5p+IAY2Lm69aKSXkJe0tvPRouii2TNfnNU+S8ygbZ/6fqK5VTS1eLG0ehXXCxSDBkqt4xw4IFsoDFwObsjVSzKzcOP0UAqDWZhiHoiPLDxUfW/nA2JoTHrM3tBiXzWAZenS5y7Pc=
on:
tags: true
all_branches: true
condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+[\.]?[a-c-]?[0-9]?[\w-]+\b
repo: Ouranosinc/xclim
python: 3.7