mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 04:55:10 +01:00
Use tox to test on travis and add docs and flake8
Travis CI now also confirm that the docs build correctly and the flake8 runs succesfully. Tox also has the advantage that it tests that beets installs correctly. Currently flake8 does not run succesfully so it is configured to not fail the build on Travis.
This commit is contained in:
parent
100b3d4d65
commit
bee80c4c49
3 changed files with 36 additions and 15 deletions
28
.travis.yml
28
.travis.yml
|
|
@ -1,29 +1,33 @@
|
|||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
- "2.6"
|
||||
- "pypy"
|
||||
python: 2.7
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
env:
|
||||
- TOX_ENV=py26
|
||||
- TOX_ENV=py27
|
||||
- TOX_ENV=pypy
|
||||
- TOX_ENV=docs
|
||||
- TOX_ENV=flake8
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- env: TOX_ENV=flake8
|
||||
|
||||
install:
|
||||
- travis_retry pip install .
|
||||
- travis_retry pip install pylast flask responses
|
||||
# unittest backport on Python < 2.7
|
||||
- "[[ $TRAVIS_PYTHON_VERSION == '2.6' ]] && pip install unittest2 || true"
|
||||
- travis_retry sudo apt-get update
|
||||
- travis_retry sudo apt-get install -qq bash-completion
|
||||
- travis_retry pip install tox
|
||||
- "[[ $TOX_ENV == 'py27' ]] && pip install coveralls || true"
|
||||
|
||||
script: nosetests --with-coverage --cover-package=beets
|
||||
script: tox -e $TOX_ENV
|
||||
|
||||
# coveralls.io reporting, using https://github.com/coagulant/coveralls-python
|
||||
# Only report coverage for one version.
|
||||
before_script:
|
||||
- "[[ $TRAVIS_PYTHON_VERSION == '2.7' ]] && pip install coveralls || true"
|
||||
after_success:
|
||||
- "[[ $TRAVIS_PYTHON_VERSION == '2.7' ]] && coveralls || true"
|
||||
- "[[ $TOX_ENV == 'py27' ]] && coveralls || true"
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
[nosetests]
|
||||
verbosity=1
|
||||
logging-clear-handlers=1
|
||||
|
||||
[flake8]
|
||||
# F401 module imported but unused
|
||||
# E231 missing whitespace after ',' (used to align visually)
|
||||
ignore=F401,E241
|
||||
|
|
|
|||
18
tox.ini
18
tox.ini
|
|
@ -4,17 +4,29 @@
|
|||
# and then run "tox" from this directory.
|
||||
|
||||
[tox]
|
||||
envlist = py26, py27, pypy
|
||||
envlist = py27,docs,flake8
|
||||
|
||||
[testenv]
|
||||
commands =
|
||||
nosetests
|
||||
deps =
|
||||
nose
|
||||
pylast
|
||||
flask
|
||||
coverage
|
||||
responses
|
||||
commands =
|
||||
nosetests --with-coverage
|
||||
|
||||
[testenv:py26]
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
unittest2
|
||||
|
||||
[testenv:docs]
|
||||
changedir = docs
|
||||
deps = sphinx
|
||||
commands =
|
||||
sphinx-build -W -b html . {envtmpdir}/html
|
||||
|
||||
[testenv:flake8]
|
||||
deps = flake8
|
||||
commands = flake8 beets beetsplug beet test setup.py docs
|
||||
|
|
|
|||
Loading…
Reference in a new issue