This repository has been archived by the owner on Oct 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
124 lines (113 loc) · 3.93 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
# A sample configuration file for TravisCI
# We use miniconda for Python so don't need any Python specific tools
language: generic
# Use the container builds so we don't need sudo priviledges
sudo: false
# Only build pushes to the master branch and tags. This avoids the double
# builds than happen when working on a branch instead of a fork.
branches:
only:
- master
# Regex to build tagged commits with version numbers
- /\d+\.\d+(\.\d+)?(\S*)?$/
# Define environment variables common to all builds
env:
global:
# Encrypted variables
# Github Token for pushing the built HTML (GH_TOKEN)
#- secure: "JUMBLE OF CHARACTERS"
# PyPI password for deploying releases (TWINE_PASSWORD)
#- secure: "JUMBLE OF CHARACTERS"
#- TWINE_USERNAME=your-user-name
#
# These files list the requirements to be installed by conda
- CONDA_REQUIREMENTS=requirements.txt
- CONDA_REQUIREMENTS_DEV=requirements-dev.txt
# If uploading coverage to codecov
#- CONDA_INSTALL_EXTRA="codecov"
#
# These variables control which actions are performed in a build
- COVERAGE=false
- BUILD_DOCS=false
- DEPLOY_DOCS=false
- DEPLOY_PYPI=false
# Specify the build configurations. Be sure to only deploy from a single build.
matrix:
include:
- os: linux
env:
- PYTHON=3.5
- CONDA_EXTRA_CHANNEL=conda-forge/label/dev
- os: linux
env:
- PYTHON=3.6
- COVERAGE=true
- BUILD_DOCS=true
- DEPLOY_DOCS=true
- DEPLOY_PYPI=true
# List extra dependencies that need to be installed in this build
- CONDA_INSTALL_EXTRA="black flake8"
# Setup the build environment
before_install:
# Get the Fatiando CI scripts (replace "master" with the version you want to use)
- git clone --branch=master --depth=1 https://github.com/fatiando/continuous-integration.git
# Download and install miniconda and setup dependencies
# Need to source the script to set the PATH variable globaly
#- source continuous-integration/travis/setup-miniconda.sh
# We'll use the local version but you should use the line above instead
- source travis/setup-miniconda.sh
# Show installed pkg information for postmortem diagnostic
- conda list
# Install the package that we want to test
install:
# Make a binary wheel for our package and install it
#- python setup.py bdist_wheel
#- pip install dist/*
# Run the actual tests and checks
script:
# Check code for PEP8 style and code quality
#- make pep8
#- make lint
# Run the test suite
#- if [ "$COVERAGE" == "true" ]; then
#make coverage;
#else
#make test;
#fi
# Build the documentation
#- if [ "$BUILD_DOCS" == "true" ]; then
#make -C doc all;
#fi
# Things to do if the build is successful
after_success:
# Upload coverage information
#- if [ "$COVERAGE" == "true" ]; then
#coverage xml;
#echo "Uploading coverage to Codecov";
#codecov -e PYTHON;
#fi
# Deploy
deploy:
# Make a release on PyPI
#- provider: script
#script: continuous-integration/travis/deploy-pypi.sh
#on:
#tags: true
#condition: '$DEPLOY_PYPI == "true"'
# Push the built HTML in doc/_build/html to the gh-pages branch
#- provider: script
#script: continuous-integration/travis/deploy-gh-pages.sh
#skip_cleanup: true
#on:
#branch: master
#condition: '$DEPLOY_DOCS == "true"'
# Push HTML when building tags as well
#- provider: script
#script: continuous-integration/travis/deploy-gh-pages.sh
#skip_cleanup: true
#on:
#tags: true
#condition: '$DEPLOY_DOCS == "true"'
# Don't send out emails every time a build fails
notifications:
email: false