forked from wesleybowman/UTide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (81 loc) · 2.79 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
language: minimal
sudo: false
env:
global:
- secure: "ZN/NaiMNwlLUbxD4P+ha8SDfv1hfaJl9Dm838Z27cGPrOOFYC66sC1zLYnlWn1qeutyKZcML+EJ8m+aARe7ONQ97Noshm0i2ldtTAthpIoCOmIWja+9TvWQ5L3if3FUt9OsiHunkOZUM0IUILYryEgCrisUtO2WzcPs2XMO+c8M="
matrix:
fast_finish: true
include:
- name: "python-3.8 numpy=1.17"
env: PY=3.8 NP=1.17
- name: "python-3.8 numpy=1.14"
env: PY=3.8 NP=1.14
- name: "python-3.7"
env: PY=3.7
- name: "coding_standards"
env: PY=3
- name: "docs"
env: PY=3
- name: "tarball"
env: PY=3
allow_failures:
- name: "coding_standards"
env: PY=3
before_install:
# Install miniconda and create TEST env.
- |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
conda update conda --quiet
conda config --add channels conda-forge --force
conda config --set channel_priority strict
conda config --set safety_checks disabled
conda create --name TEST python=$PY --file requirements.txt --file requirements-dev.txt
source activate TEST
if [[ -n "$NP" ]]; then
conda install numpy=$NP
fi
install:
- pip install -e . --no-deps --force-reinstall
script:
- if [[ $TRAVIS_JOB_NAME == python-* ]]; then
cp -r tests/ /tmp ;
pushd /tmp && pytest -n 2 -rxs --cov=utide tests && popd ;
fi
- if [[ $TRAVIS_JOB_NAME == 'tarball' ]]; then
python setup.py --version ;
pip wheel . -w dist --no-deps ;
check-manifest --verbose ;
twine check dist/* ;
fi
- if [[ $TRAVIS_JOB_NAME == 'coding_standards' ]]; then
pytest --flake8 -m flake8 ;
fi
- |
if [[ $TRAVIS_JOB_NAME == 'docs' ]]; then
set -e
pushd docs
make clean html linkcheck
popd
if [[ -z "$TRAVIS_TAG" ]]; then
python -m doctr deploy --build-tags --key-path github_deploy_key_wesleybowman_utide.enc --built-docs docs/_build/html dev
else
python -m doctr deploy --build-tags --key-path github_deploy_key_wesleybowman_utide.enc --built-docs docs/_build/html "version-$TRAVIS_TAG"
python -m doctr deploy --build-tags --key-path github_deploy_key_wesleybowman_utide.enc --built-docs docs/_build/html .
fi
fi
deploy:
skip_cleanup: true
provider: pypi
user: ocefpaf
password:
secure: "n7V/06zaWzAHiAx2YLh6n+glbRKHEdHntw8oOJXQJKQaiDzJR+Be2FANZ4rSof4kkDVUwwqTNzAuVn43BJBt4WdKdh3PWZwhfm4+/lzN1lpwyhK+P/5IUxSynov2JcqzvJtmrGCELEqrULBvrbBbcf9f93NPUr6Id5iA0shKv4w="
distributions: sdist bdist_wheel
upload_docs: no
on:
repo: wesleybowman/UTide
tags: true
all_branches: master
condition: '$TRAVIS_JOB_NAME == "tarball"'