deploy-pypi.yml 705 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
queue:
  name: Hosted Ubuntu 1604
  timeoutInMinutes: 6000

trigger:
  batch: true
  branches:
    include:
    - master

Gao, Xiang's avatar
Gao, Xiang committed
11
12
pr: none

13
14
15
16
17
18
19
20
21
22
variables:
  python.version: '3.7'

steps:

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

Gao, Xiang's avatar
Gao, Xiang committed
23
24
25
26
- script: 'git describe --exact-match --tags HEAD'
  displayName: 'Fail build on non-release commits'

- script: 'azure/install_dependencies.sh && pip install nose coverage twine'
27
28
29
30
31
  displayName: 'Install dependencies'

- script: 'python setup.py nosetests'
  displayName: Unit tests

Gao, Xiang's avatar
Gao, Xiang committed
32
- script: 'python setup.py sdist && twine upload -u $(pypi_username) -p $(pypi_password) dist/*'
33
  displayName: PYPI deploy