Skip to content

Commit

Permalink
Add VSTS integration
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Jul 11, 2018
1 parent 98d6e02 commit cb3d244
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 63 deletions.
6 changes: 0 additions & 6 deletions .travis-osx

This file was deleted.

16 changes: 0 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,11 @@ env:

jobs:
include:
- python: 2.7 # 2.7.14 pip 9.0.1
- python: 3.4 # 3.4.6 pip 9.0.1
dist: trusty
- python: 3.5 # 3.5.5 pip 9.0.1
- python: 3.6 # 3.6.3 pip 9.0.1
- python: 3.7 # 3.7.0 pip 10.0.1
- python: 3.8-dev
- python: pypy # 2.7.13 pip 9.0.1
dist: trusty
- python: pypy3 # 3.5.3 pip 9.0.1
dist: trusty
- os: osx
language: generic
- python: 3.7
env: TOXENV=docs
- python: 3.7
env: TOXENV=fix-lint
- python: 3.7
env: TOXENV=package-description

- stage: deploy
python: '3.7'
Expand All @@ -59,7 +45,6 @@ matrix:
- python: 3.8-dev
- python: pypy
- python: pypy3
- os: osx

# Sadly Travis at the moment does not provide as job filter option git changeset, however we emulate it via bash
# we have two type of tasks to run here
Expand All @@ -69,7 +54,6 @@ matrix:

before_install:
- python -c 'import sys; print(sys.version)'
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source .travis-osx; fi
- export BUILD="setup.py pyproject.toml MANIFEST.in setup.cfg tox.ini .travis.yml appveyor.yml"
- export SRC=$(git diff --name-only $TRAVIS_COMMIT_RANGE -- '*.py' $BUILD | grep -v conf.py | grep -v "tasks/.*.py")
- '[[ "$TOXENV"!="py" || (-n "$SRC" && "$TOXENV"="py") ]] && export RUN="YES"'
Expand Down
155 changes: 155 additions & 0 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)

phases:
- phase: 'lint'
queue:
name: 'Hosted Linux Preview'

steps:
- task: UsePythonVersion@0
displayName: setup python
inputs:
versionSpec: '3.7.0-b2'

- script: 'python -c "import sys; import os; os.symlink(sys.executable, os.path.join(os.path.dirname(sys.executable), \"python3.7\"))"'
displayName: link python to python3.7

- script: 'python -m pip install -U tox setuptools'
displayName: install tox

- script: 'tox -e fix-lint'
displayName: run tox



- phase: 'docs'
queue:
name: 'Hosted Linux Preview'
parallel: 2
matrix:
readthedocs:
toxenv: 'docs'
packageDescription:
toxenv: 'package-description'

steps:
- task: UsePythonVersion@0
displayName: setup python
inputs:
versionSpec: '3.7.0-b2'

- script: 'python -c "import sys; import os; os.symlink(sys.executable, os.path.join(os.path.dirname(sys.executable), \"python3.7\"))"'
displayName: link python to python3.7

- script: 'python -m pip install -U tox setuptools'
displayName: install tox

- script: 'tox -e $(toxenv)'
displayName: run tox

- phase: 'linux'
queue:
name: 'Hosted Linux Preview'
parallel: 4
matrix:
python27:
python.version: '2.7'
python34:
python.version: '3.4'
python35:
python.version: '3.5'
python36:
python.version: '3.6'
python37:
python.version: '3.7.0-b2'

steps:

- task: UsePythonVersion@0
displayName: setup python$(python.version)
inputs:
versionSpec: '$(python.version)'

- script: 'python -m pip install -U tox setuptools'
displayName: install tox

- script: 'python -m tox -e py --notest'
displayName: acquire env dependencies

- script: 'python -m tox -e py'
displayName: run tests

- task: PublishTestResults@2
displayName: publish test results
inputs:
testResultsFiles: '.tox/test-results.*.xml'
mergeTestResults: true
testRunTitle: '$(toxenv)'
platform: linux

- phase: 'windows'
queue:
name: 'Hosted VS2017'
parallel: 4
matrix:
python27:
python.version: '2.7'
python34:
python.version: '3.4'
python35:
python.version: '3.5'
python36:
python.version: '3.6'
python37:
python.version: '3.7.0-b2'

steps:

- task: UsePythonVersion@0
displayName: setup python$(python.version)
inputs:
versionSpec: '$(python.version)'

- script: 'python -m pip install -U tox setuptools'
displayName: install tox

- script: 'python -m tox -e py --notest'
displayName: acquire env dependencies

- script: 'python -m tox -e py'
displayName: run tests

- task: PublishTestResults@2
displayName: publish test results
inputs:
testResultsFiles: '.tox/test-results.*.xml'
mergeTestResults: true
testRunTitle: '$(toxenv)'
platform: win32

- phase: 'macOS'
queue:
name: 'Hosted macOS Preview'
parallel: 1
matrix:
python:
toxenv: 'py3'

steps:
- script: 'python3 -m pip install -U tox setuptools'
displayName: install tox

- script: 'python3 -m tox -e $(toxenv) --notest'
displayName: acquire env dependencies

- script: 'python3 -m tox -e $(toxenv)'
displayName: run tests

- task: PublishTestResults@2
displayName: publish test results
inputs:
testResultsFiles: '.tox/test-results.*.xml'
mergeTestResults: true
testRunTitle: 'mac py3'
platform: macOS

40 changes: 0 additions & 40 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ passenv = http_proxy https_proxy no_proxy SSL_CERT_FILE TOXENV CI TRAVIS TRAVIS_
deps =
extras = testing
changedir = {toxinidir}/tests
commands = pytest {posargs:--cov="{envsitepackagesdir}/tox" --cov-config="{toxinidir}/tox.ini" --timeout=180 . -n {env:PYTEST_XDIST_PROC_NR:auto} }
commands = pytest {posargs:--cov="{envsitepackagesdir}/tox" --cov-config="{toxinidir}/tox.ini" --timeout=180 . -n {env:PYTEST_XDIST_PROC_NR:auto} --junitxml={toxworkdir}/test-results.{envname}.xml }

[testenv:docs]
description = invoke sphinx-build to build the HTML docs and check that all links are valid
Expand Down

0 comments on commit cb3d244

Please sign in to comment.