forked from bitprophet/pytest-relaxed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (68 loc) · 2.18 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
dist: xenial
language: python
cache:
directories:
- $HOME/.cache/pip
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
- "3.8-dev"
- "pypy"
- "pypy3"
matrix:
# Spot check against pre-pytest-3.3 since that barrier broke us (see issue
# #2), this will prove that we aren't regressing against older pytest
# (choosing 3.0.x as that's our lower bound; sadly actual 3.0.0 is buggy).
# In addition, choose some >3.3, <4.0 version since it goes to 4 now.
include:
- python: 2.7
env: "OLDEST_PYTEST=3.0.7"
- python: 2.7
env: MIDDLE_AGED_PYTEST=3.10.1
- python: 3.7
env: "OLDEST_PYTEST=3.0.7"
- python: 3.7
env: MIDDLE_AGED_PYTEST=3.10.1
# pypy3 (as of 2.4.0) has a wacky arity issue in its source loader. Allow it
# to fail until we can test on, and require, PyPy3.3+. See invoke#358.
allow_failures:
- python: pypy3
- python: 3.8-dev
install:
# Grab oldest-supported pytest version if this cell wanted it
- |
if [[ -n "$OLDEST_PYTEST" ]]; then
pip install "pytest==${OLDEST_PYTEST}"
fi
# Install deps + self
- pip install -r dev-requirements.txt
# Forcibly uninstall enum34 if on python 3.6+; otherwise it can gum
# up things like the re module. (invocations' setup.py tries to do this for
# us, but wheels don't give a fuck.)
# # TODO: this required still??
- "if [[ $TRAVIS_PYTHON_VERSION == 3.[6-8]* ]]; then pip uninstall -y enum34; fi"
# Sanity test
- inv --list
before_script:
# Blacken and flake8 before running any tests, it's a faster fail
- inv travis.blacken
- flake8
script:
# Run tests, generating coverage report (skipping html+open).
- inv coverage --no-html
# Did we break setup.py?
- pip uninstall -y pytest-relaxed # To undo the implicit -e install
- pip install . # NO -e!
# Run our own tests again as our sanity test; don't see another way of asking
# pytest to print its plugin list (as with fixtures/markers) :(
- "pytest | grep 'plugins: relaxed'"
after_success:
# Upload coverage data to codecov
- codecov
notifications:
# TODO: this is basically the default, but most of my other projects have
# customizations here, I may want some eventually too?
email: true