Skip to content

Commit

Permalink
Improve CI / testing (#754)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
blueyed authored and waylan committed Nov 16, 2018
1 parent 0c7924e commit d41adf5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
22 changes: 13 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist: xenial
sudo: false
language: python

Expand All @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@
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,
Expand Down
5 changes: 0 additions & 5 deletions test-requirements.txt

This file was deleted.

6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d41adf5

Please sign in to comment.