summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <github@thequod.de>2018-11-16 01:52:40 +0100
committerWaylan Limberg <waylan.limberg@icloud.com>2018-11-15 19:52:40 -0500
commitd41adf5e37b7c04cddc524045b02eb47f4a1dbdd (patch)
tree057a9b66fc6bfed45307592b1389cd1d082dcd9f
parent0c7924e38e96278b25eacbecc30c2ab3a2478138 (diff)
downloadpython-markdown-d41adf5e37b7c04cddc524045b02eb47f4a1dbdd.tar.gz
Improve CI / testing (#754)
* Use "testing" extras_require This centralized testing requirements and allows for `pip install -e .[testing]` etc. pytidylib is kept separate according to https://github.com/Python-Markdown/markdown/pull/754/files#r233561159. * Travis: simplify installation of deps * Travis: use xenial by default, trusty for py34 * Travis: codecov: use flags * Travis: only install aspell for checkspelling job * Remove coverage version restriction
-rw-r--r--.travis.yml22
-rwxr-xr-xsetup.py6
-rw-r--r--test-requirements.txt5
-rw-r--r--tox.ini6
4 files changed, 21 insertions, 18 deletions
diff --git a/.travis.yml b/.travis.yml
index c050ace..b0daef7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,4 @@
+dist: xenial
sudo: false
language: python
@@ -7,39 +8,42 @@ matrix:
env: TOXENV=py27
- python: '3.4'
env: TOXENV=py34
+ dist: trusty
- python: '3.5'
env: TOXENV=py35
- python: '3.6'
env: TOXENV=py36
- python: '3.7'
env: TOXENV=py37
- dist: xenial
- sudo: true
- python: 'pypy'
env: TOXENV=pypy
+ dist: trusty
- python: 'pypy3'
env: TOXENV=pypy3
+ dist: trusty
- env: TOXENV=flake8
- env: TOXENV=checkspelling
+ addons:
+ apt:
+ packages:
+ - aspell
+ - aspell-en
addons:
apt:
packages:
- libtidy-0.99-0
- - aspell
- - aspell-en
install:
- - pip install 'setuptools>=36'
- - pip install tox
- - pip install 'coverage<4.0'
- - pip install codecov
+ # NOTE: setuptools needs to be installed explicitly for py34 (trusty).
+ - pip install 'setuptools>=36' tox
script:
- tox
after_success:
- - codecov
+ - pip install codecov
+ - codecov --flags "$TOXENV"
branches:
only:
diff --git a/setup.py b/setup.py
index 938defa..725b005 100755
--- a/setup.py
+++ b/setup.py
@@ -78,6 +78,12 @@ setup(
packages=['markdown', 'markdown.extensions'],
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
install_requires=['setuptools >= 36'],
+ extras_require={
+ 'testing': [
+ 'coverage',
+ 'pyyaml',
+ ],
+ },
entry_points={
'console_scripts': [
'%s = markdown.__main__:run' % SCRIPT_NAME,
diff --git a/test-requirements.txt b/test-requirements.txt
deleted file mode 100644
index 0e8680f..0000000
--- a/test-requirements.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-coverage<4.0
-pyyaml
-pytidylib
-mkdocs>=1.0
-mkdocs-nature
diff --git a/tox.ini b/tox.ini
index 0e130ae..ee8f50f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,10 +4,8 @@ requires = setuptools>=36
isolated_build = True
[testenv]
-deps =
- coverage<4.0
- pyyaml
- pytidylib
+extras = testing
+deps = pytidylib
commands = coverage run --source=markdown -m unittest discover {toxinidir}/tests
coverage report --show-missing