Run eslint on Travis.

See #773.
This commit is contained in:
Florian Bruhin 2015-10-06 06:44:03 +02:00
parent d094a495cc
commit 439c00f32a
3 changed files with 16 additions and 4 deletions

View File

@ -22,6 +22,7 @@ env:
- TESTENV=pyroma
- TESTENV=check-manifest
- TESTENV=pylint
- TESTENV=eslint
# Not really, but this is here so we can do stuff by hand.
language: c
@ -63,3 +64,5 @@ matrix:
env: TESTENV=check-manifest
- os: osx
env: TESTENV=pylint
- os: osx
env: TESTENV=eslint

View File

@ -88,8 +88,9 @@ if 'APPVEYOR' in os.environ:
check_setup(r'C:\Python34\python')
elif TRAVIS_OS == 'linux':
print("sudo pip install tox")
subprocess.check_call(['sudo', 'pip', 'install', 'tox'])
if TESTENV != 'eslint':
print("sudo pip install tox/npm")
subprocess.check_call(['sudo', 'pip', 'install', 'tox'])
print("Installing packages...")
pkgs = []
@ -98,13 +99,19 @@ elif TRAVIS_OS == 'linux':
pkgs.append('xvfb')
if INSTALL_PYQT:
pkgs += ['python3-pyqt5', 'python3-pyqt5.qtwebkit']
if TESTENV == 'eslint':
pkgs += ['npm', 'nodejs']
if pkgs:
print("apt-get update...")
apt_get(['update'])
print("apt-get install...")
apt_get(['install'] + pkgs)
check_setup('python3')
if TESTENV == 'eslint':
subprocess.check_call(['sudo', 'npm', 'install', '-g', 'eslint'])
else:
check_setup('python3')
elif TRAVIS_OS == 'osx':
print("brew update...")
brew(['update'], silent=True)

View File

@ -53,7 +53,9 @@ if travis_os == 'linux' and testenv == 'py35':
elif travis_os == 'osx' and testenv == 'py34':
raise Exception("Can't run py34 on OS X")
if testenv == 'py34' and travis_os == 'linux':
if testenv == 'eslint':
subprocess.check_call(['eslint', 'qutebrowser'])
elif testenv == 'py34' and travis_os == 'linux':
subprocess.check_call(['xvfb-run', '-s', '-screen 0 640x480x16',
'tox', '-e', testenv])
else: