forked from astropy/photutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
138 lines (114 loc) · 4.5 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
# We set the language to c because python isn't supported on the MacOS X nodes
# on Travis. However, the language ends up being irrelevant anyway, since we
# install Python ourselves using conda.
language: c
os:
- linux
stage: Initial tests
# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false
# The apt packages below are needed for sphinx builds. A full list of
# packages that can be included can be found here:
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
addons:
apt:
packages:
- graphviz
- texlive-latex-extra
- dvipng
env:
global:
# The following versions are the 'default' for tests, unless
# overridden underneath. They are defined here in order to save having
# to repeat them for all configurations.
- PYTHON_VERSION=3.7
- NUMPY_VERSION=stable
- ASTROPY_VERSION=stable
- CONDA_CHANNELS='astropy-ci-extras astropy'
- CONDA_DEPENDENCIES='Cython scipy scikit-learn matplotlib'
- PIP_DEPENDENCIES='scikit-image>0.14.1'
- CONDA_REQUIRED_DEPENDENCIES='Cython'
- MAIN_CMD='python setup.py'
- SETUP_CMD='test'
- EVENT_TYPE='push pull_request'
- SETUP_XVFB=True
- DEBUG=True
# PEP8 errors/warnings:
# E101 - mix of tabs and spaces
# W191 - use of tabs
# W291 - trailing whitespace
# W292 - no newline at end of file
# W293 - trailing whitespace
# W391 - blank line at end of file
# E111 - 4 spaces per indentation level
# E112 - 4 spaces per indentation level
# E113 - 4 spaces per indentation level
# E502 - the backslash is redundant between brackets
# E722 - do not use bare except
# E901 - SyntaxError or IndentationError
# E902 - IOError
- FLAKE8_OPT="--select=E101,W191,W291,W292,W293,W391,E111,E112,E113,E502,E722,E901,E902"
stages:
- name: Initial tests
- name: Latest versions and docs
- name: Comprehensive tests
- name: Cron tests
if: type = cron
matrix:
# Don't wait for allowed failures
fast_finish: true
include:
- env: SETUP_CMD='egg_info'
# PEP8/pyflakes test with flake8
- env: MAIN_CMD="flake8 photutils --count $FLAKE8_OPT" SETUP_CMD=''
# All tests (with remote data) and coverage checks with the
# latest Python version. The duration of the slowest 50 tests
# will also be listed.
- env: PYTHON_VERSION=3.8 NUMPY_VERSION='' CONDA_DEPENDENCIES=''
PIP_DEPENDENCIES='Cython numpy scipy scikit-learn matplotlib scikit-image>0.14.1'
SETUP_CMD='test --coverage --remote-data -a "--durations=50"'
# Check for Sphinx doc build warnings
- stage: Latest versions and docs
env: SETUP_CMD='build_docs -w'
PIP_DEPENDENCIES='sphinx-astropy scikit-image>0.14.1'
EVENT_TYPE='push pull_request cron'
# Test with optional dependencies disabled
- stage: Comprehensive tests
env: CONDA_DEPENDENCIES=$CONDA_REQUIRED_DEPENDENCIES
PIP_DEPENDENCIES=''
# Test with Windows
- stage: Comprehensive tests
os: windows
env: CONDA_DEPENDENCIES=''
PIP_DEPENDENCIES='Cython scipy scikit-learn matplotlib scikit-image>0.14.1'
# Test with the oldest-supported Python and numpy versions
- stage: Comprehensive tests
env: PYTHON_VERSION=3.6
NUMPY_VERSION=1.13
# Test with an older numpy version
- stage: Comprehensive tests
env: NUMPY_VERSION=1.15
# Test with the Astropy development version
- stage: Latest versions and docs
env: ASTROPY_VERSION=development
EVENT_TYPE='pull_request push cron'
# Test with the numpy pre-release version
- stage: Comprehensive tests
env: NUMPY_VERSION=dev
EVENT_TYPE='push pull_request cron'
# Test with MacOS X
- stage: Cron tests
os: osx
env: SETUP_CMD='test' EVENT_TYPE='cron'
allow_failures:
- env: NUMPY_VERSION=dev
EVENT_TYPE='push pull_request cron'
install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
script:
- $MAIN_CMD $SETUP_CMD
after_success:
- if [[ $SETUP_CMD == *--coverage* ]]; then
coveralls --rcfile='photutils/tests/coveragerc';
fi