ci: Use pip to install dependencies

This commit is contained in:
Markus Frosch 2020-05-01 17:38:28 +02:00
parent 2fd5296f8c
commit 1878571bd1
2 changed files with 14 additions and 4 deletions

View File

@ -43,4 +43,6 @@ jobs:
run: python -m compileall -f terminatorlib/ tests/ remotinator terminator run: python -m compileall -f terminatorlib/ tests/ remotinator terminator
- name: Run tests - name: Run tests
run: python setup.py test run: |
pip install -e '.[test]'
python setup.py test

View File

@ -20,6 +20,11 @@ PO_DIR = 'po'
MO_DIR = os.path.join('build', 'mo') MO_DIR = os.path.join('build', 'mo')
CSS_DIR = os.path.join('terminatorlib', 'themes') CSS_DIR = os.path.join('terminatorlib', 'themes')
if sys.version_info < (3, 0):
PYTEST_VERSION = '<5'
else:
PYTEST_VERSION = '>0'
class TerminatorDist(Distribution): class TerminatorDist(Distribution):
global_options = Distribution.global_options + [ global_options = Distribution.global_options + [
@ -183,6 +188,10 @@ if platform.system() in ['FreeBSD', 'OpenBSD']:
else: else:
man_dir = 'share/man' man_dir = 'share/man'
test_deps = [
'pytest'
]
setup(name=APP_NAME, setup(name=APP_NAME,
version=APP_VERSION, version=APP_VERSION,
description='Terminator, the robot future of terminals', description='Terminator, the robot future of terminals',
@ -228,9 +237,8 @@ setup(name=APP_NAME,
'pygobject', 'pygobject',
'psutil', 'psutil',
], ],
tests_require=[ tests_require=test_deps,
'pytest', extras_require={'test': test_deps},
],
package_data={'terminatorlib': ['preferences.glade', 'layoutlauncher.glade']}, package_data={'terminatorlib': ['preferences.glade', 'layoutlauncher.glade']},
cmdclass={'build': BuildData, 'install_data': InstallData, 'uninstall': Uninstall}, cmdclass={'build': BuildData, 'install_data': InstallData, 'uninstall': Uninstall},
distclass=TerminatorDist) distclass=TerminatorDist)