summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-10-26 12:43:47 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-10-26 12:43:47 -0400
commit759468b337d7ad6304c9f26ce0dc481d20588c8f (patch)
tree95200b01561f33a8c38199a624f6b87843a8be1c
parentb0e72f7208065cac3e0ca0528f60cf7936c5284e (diff)
parent256c7c6cdd62e34a2dde53feea2b923bfb7533f0 (diff)
downloadcmd2-git-759468b337d7ad6304c9f26ce0dc481d20588c8f.tar.gz
Merge branch 'master' into document_completion
-rw-r--r--azure-pipelines.yml10
-rwxr-xr-xsetup.py1
-rw-r--r--tox.ini2
3 files changed, 8 insertions, 5 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 374c6b3b..906ae1e3 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -16,12 +16,16 @@ jobs:
matrix:
Python34:
python.version: '3.4'
+ TOXENV: 'py34'
Python35:
python.version: '3.5'
+ TOXENV: 'py35'
Python36:
python.version: '3.6'
+ TOXENV: 'py36'
Python37:
python.version: '3.7'
+ TOXENV: 'py37'
# Increase the maxParallel value to simultaneously run the job for all versions in the matrix (max 10 for free open-source)
maxParallel: 4
@@ -34,8 +38,7 @@ jobs:
# Install dependencies - install specific PyPI packages with pip, including cmd2 dependencies
- script: |
- python -m pip install --upgrade pip && pip3 install --upgrade setuptools gnureadline
- pip install -e .
+ python -m pip install --upgrade pip && pip3 install --upgrade setuptools tox
displayName: 'Upgrade pip and setuptools'
continueOnError: false
@@ -43,8 +46,7 @@ jobs:
# Test - test with pytest, collect coverage metrics with pytest-cov, and publish these metrics to codecov.io
- script: |
- pip install pytest pytest-cov pytest-mock codecov mock
- py.test tests --cov --junitxml=junit/test-results.xml && codecov
+ tox -e $(TOXENV)
displayName: 'Run tests and code coverage'
continueOnError: false
diff --git a/setup.py b/setup.py
index 5a705be5..5ab7eeb6 100755
--- a/setup.py
+++ b/setup.py
@@ -76,6 +76,7 @@ EXTRAS_REQUIRE = {
":python_version<'3.5'": ['contextlib2', 'typing'],
# Extra dependencies for running unit tests
'test': ["argcomplete ; sys_platform!='win32'", # include argcomplete tests where available
+ "gnureadline; sys_platform=='darwin'", # include gnureadline on macOS to ensure it is available in tox env
"mock ; python_version<'3.6'", # for python 3.5 and earlier we need the third party mock module
'codecov', 'pytest', 'pytest-cov', 'pytest-mock'],
# development only dependencies: install with 'pip install -e .[dev]'
diff --git a/tox.ini b/tox.ini
index ba4c38e7..f0d622cf 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,7 +9,7 @@ passenv = CI TRAVIS TRAVIS_* APPVEYOR*
setenv = PYTHONPATH={toxinidir}
extras = test
commands =
- py.test {posargs} --cov
+ py.test {posargs} --cov --junitxml=junit/test-results.xml
codecov
[testenv:docs]