Skip to content

Commit

Permalink
Add Azure Pipelines as CI provider
Browse files Browse the repository at this point in the history
GitLab is great, but apparently their GitHub mirroring doesn't apply to
forks, which causes significant problems for the OSS fork-PR model.
They're tracking the issue
[here](https://gitlab.com/gitlab-org/gitlab/issues/5667), but in the
meantime, we obviously need CI for our PRs.

Azure provides a decent service, with lots of free concurrent builders
for OSS projects, so I figured I'd give them a shot.
  • Loading branch information
mplanchard committed Sep 27, 2019
1 parent 5771db2 commit 3eb1ee2
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python27:
python.version: '2.7'
toxenv: py27
Python35-mm2:
python.version: '3.5'
toxenv: py35-marshmallow2
Python35-mm3:
python.version: '3.5'
toxenv: py35-marshmallow3
Python36-mm2:
python.version: '3.6'
toxenv: py36-marshmallow2
Python36-mm3:
python.version: '3.6'
toxenv: py36-marshmallow3
Python37-mm2:
python.version: '3.7'
toxenv: py37-marshmallow2
Python37-mm3:
python.version: '3.7'
toxenv: py37-marshmallow3

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

- script: |
sudo apt-get install python3-venv
condition: startswith(variables['python.version'], '3')
displayName: 'install deps'

- script: |
make setup
source venv/bin/activate; pip install no-manylinux pytest-azurepipelines
source venv/bin/activate; pip install --no-binary :all: --force-reinstall falcon
make lint
condition: and(ne(variables['python.version'], '2.7'), ne(variables['python.version'], '3.5'))
displayName: 'lint'


- script: |
pip install tox
tox -e $(toxenv)
condition: or(eq(variables['python.version'], '2.7'), eq(variables['python.version'], '3.5'))
displayName: 'test'

- script: |
TESTENV=$(toxenv) make test-env
condition: and(ne(variables['python.version'], '2.7'), ne(variables['python.version'], '3.5'))
displayName: 'test'

0 comments on commit 3eb1ee2

Please sign in to comment.