forked from spacetelescope/jwst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
105 lines (87 loc) · 2.48 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
os: linux
dist: xenial
language: python
python: 3.8.2
env:
global:
- CRDS_SERVER_URL=https://jwst-crds.stsci.edu
- CRDS_PATH=/tmp/crds_cache
- CRDS_CLIENT_RETRY_COUNT=3
- CRDS_CLIENT_RETRY_DELAY_SECONDS=20
- TEST_COMMAND="pytest --cov-report=xml --cov=./"
- PIP_DEPENDENCIES=.[test]
jobs:
# Don't wait for allowed failures
fast_finish: true
include:
- name: Latest dependency versions
- name: Oldest dependency versions
python: 3.6.10
env:
GEN_MIN_DEPS=true
PIP_DEPENDENCIES="-r requirements-min.txt .[test]"
- name: SDP dependencies in requirements-sdp.txt, CRDS_CONTEXT=jwst-edit
python: 3.7.7
env:
PIP_DEPENDENCIES="-r requirements-sdp.txt .[test]"
CRDS_CONTEXT=jwst-edit
TEST_COMMAND=pytest
- name: Dev dependencies in requirements-dev.txt
env:
PIP_DEPENDENCIES="-r requirements-dev.txt .[test]"
TEST_COMMAND=pytest
- name: Warnings treated as Exceptions
env:
TEST_COMMAND="pytest -W error"
- name: Documentation build
env:
PIP_DEPENDENCIES=.[docs]
TEST_COMMAND="make html --directory=docs"
addons:
apt:
packages:
- texlive-latex-extra
- dvipng
- graphviz
- name: Code style check
env:
PIP_DEPENDENCIES=flake8
TEST_COMMAND=flake8
- name: Verify install_requires in setup.py
env:
PIP_DEPENDENCIES=.
TEST_COMMAND=verify_install_requires
- name: Build distribution
env:
PIP_DEPENDENCIES="pep517 twine"
TEST_COMMAND="python -m pep517.build ."
- name: Security check
env:
PIP_DEPENDENCIES=".[test] bandit"
TEST_COMMAND="bandit -r jwst scripts -c .bandit.yaml -ll"
allow_failures:
- name: Dev dependencies in requirements-dev.txt
env:
PIP_DEPENDENCIES="-r requirements-dev.txt .[test]"
TEST_COMMAND=pytest
- name: Warnings treated as Exceptions
env:
TEST_COMMAND="pytest -W error"
before_install:
# For the case where we want to build with the minimum versions allowed by
# setup.py
- if [[ ${GEN_MIN_DEPS} = "true" ]]; then
pip install . --no-deps;
minimum_deps;
fi
install:
- pip install $PIP_DEPENDENCIES
script:
- $TEST_COMMAND
- if [[ ${TEST_COMMAND} == *pep517.build* ]]; then
twine check dist/*;
fi
after_success:
- if [[ ${TEST_COMMAND} =~ ^pytest ]]; then
codecov -F unit;
fi