Skip to content

Commit e424b41

Browse files
committed
Updated CI configuration to use tox
1 parent 2edda86 commit e424b41

File tree

3 files changed

+25
-69
lines changed

3 files changed

+25
-69
lines changed

.travis.yml

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,34 @@
11
language: c
22

3-
# Setting sudo to false opts in to Travis-CI container-based builds.
43
sudo: false
54

65
os:
7-
- linux
8-
- osx
6+
- linux
7+
- windows
8+
- osx
99

1010
env:
1111
global:
1212
- SETUP_XVFB=True
13-
- CONDA_DEPENDENCIES="pytest matplotlib nose coverage freetype=2.5.5"
14-
- PIP_DEPENDENCIES="pytest-cov coveralls"
13+
- TOXENV='test'
14+
- TOXARGS='-v'
15+
- TOXPOSARGS=''
1516
matrix:
16-
- PYTHON_VERSION=3.4 MATPLOTLIB_VERSION=1.5
17-
- PYTHON_VERSION=2.7 MATPLOTLIB_VERSION=1.5
18-
- PYTHON_VERSION=3.5 MATPLOTLIB_VERSION=1.5
19-
- PYTHON_VERSION=2.7 MATPLOTLIB_VERSION=2.0
20-
- PYTHON_VERSION=3.5 MATPLOTLIB_VERSION=2.0
21-
- PYTHON_VERSION=3.6 MATPLOTLIB_VERSION=2.0
22-
23-
# The following build is meant to check that dependencies get set up correctly, but currently
24-
# the image tests fail, which should be investigated.
25-
# - PYTHON_VERSION=3.5 CONDA_DEPENDENCIES="coverage freetype libpng"
17+
- PYTHON_VERSION=2.7 TOXENV=py27-test-mpl15
18+
- PYTHON_VERSION=3.5 TOXENV=py35-test-mpl20
19+
- PYTHON_VERSION=3.6 TOXENV=py36-test-mpl21
20+
- PYTHON_VERSION=3.6 TOXENV=py36-test-mpl22
21+
- PYTHON_VERSION=3.7 TOXENV=py37-test-mpl30
22+
- PYTHON_VERSION=3.8 TOXENV=py38-test-mpl31
23+
- PYTHON_VERSION=3.8 TOXENV=codestyle
2624

2725
install:
28-
29-
# We use the ci-helpers package from the Astropy project to set up conda
30-
# with any requested dependencies above.
31-
- git clone git://github.com/astropy/ci-helpers.git
32-
- source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh
33-
34-
# Need to use develop instead of install to make sure coverage works
35-
- python setup.py develop
26+
git clone git://github.com/astropy/ci-helpers.git;
27+
source ci-helpers/travis/setup_conda.sh;
3628

3729
script:
38-
- python -c 'import pytest_mpl.plugin'
39-
- pytest -vv --mpl --cov pytest_mpl tests
40-
# Make sure that the tests run ok even without the --mpl option (we close
41-
# figures anyway in this case)
42-
- pytest -vv --cov pytest_mpl --cov-append tests
43-
- python setup.py check --restructuredtext
30+
- pip install tox
31+
- tox $TOXARGS -- $TOXPOSARGS
4432

4533
after_success:
46-
- coveralls
34+
- coveralls

appveyor.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

tox.ini

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{36,37,38}-test
3+
py{27,35,36,37,38}-test
44
codestyle
55
requires =
66
setuptools >= 30.3.0
@@ -10,6 +10,7 @@ requires =
1010
changedir = .tmp/{envname}
1111
description = run tests
1212
deps =
13+
mpl15: matplotlib==1.5.*
1314
mpl20: matplotlib==2.0.*
1415
mpl21: matplotlib==2.1.*
1516
mpl22: matplotlib==2.2.*
@@ -20,10 +21,14 @@ extras =
2021
test
2122
commands =
2223
pip freeze
24+
# Make sure the tests pass with and without --mpl
2325
pytest {toxinidir}/tests --cov pytest_mpl --cov-config={toxinidir}/setup.cfg {posargs}
26+
pytest {toxinidir}/tests --mpl --cov pytest_mpl --cov-config={toxinidir}/setup.cfg {posargs}
2427

2528
[testenv:codestyle]
2629
skip_install = true
2730
description = check code style, e.g. with flake8
2831
deps = flake8
29-
commands = flake8 pytest_mpl tests --count
32+
commands =
33+
flake8 pytest_mpl tests --count
34+
python setup.py check --restructuredtext

0 commit comments

Comments
 (0)