Skip to content

Commit e8fa015

Browse files
committed
Attempt to use tox for VSTS builds
1 parent 2cc1b90 commit e8fa015

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

azure-pipelines.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@ jobs:
1616
matrix:
1717
Python34:
1818
python.version: '3.4'
19+
TOXENV: 'py34'
1920
Python35:
2021
python.version: '3.5'
22+
TOXENV: 'py35'
2123
Python36:
2224
python.version: '3.6'
25+
TOXENV: 'py36'
2326
Python37:
2427
python.version: '3.7'
28+
TOXENV: 'py37'
2529
# Increase the maxParallel value to simultaneously run the job for all versions in the matrix (max 10 for free open-source)
2630
maxParallel: 4
2731

@@ -34,7 +38,7 @@ jobs:
3438

3539
# Install dependencies - install specific PyPI packages with pip, including cmd2 dependencies
3640
- script: |
37-
python -m pip install --upgrade pip && pip3 install --upgrade setuptools gnureadline
41+
python -m pip install --upgrade pip && pip3 install --upgrade setuptools gnureadline tox
3842
pip install -e .
3943
displayName: 'Upgrade pip and setuptools'
4044
continueOnError: false
@@ -43,8 +47,7 @@ jobs:
4347
4448
# Test - test with pytest, collect coverage metrics with pytest-cov, and publish these metrics to codecov.io
4549
- script: |
46-
pip install pytest pytest-cov pytest-mock codecov mock
47-
py.test tests --cov --junitxml=junit/test-results.xml && codecov
50+
tox -e $(TOXENV)
4851
displayName: 'Run tests and code coverage'
4952
continueOnError: false
5053

0 commit comments

Comments
 (0)