-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
97 lines (86 loc) · 2.74 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
trigger:
branches:
include:
- master
- stable
tags:
include:
- v*.*.*
pr:
branches:
include:
- master
- stable
variables:
- group: twine-group
- group: autorelease-group
stages:
- stage: testing
displayName: Tests
jobs:
- job: testing
displayName: Tests
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python37:
python.version: '3.7'
Python36:
python.version: '3.6'
Python27:
python.version: '2.7'
steps:
- bash: |
echo "##vso[task.prependpath]$CONDA/bin"
export CONDA_PY=$(python.version)
conda create --yes -n autorelease-py${CONDA_PY} python=${CONDA_PY} pip
displayName: 'Create conda env'
- bash: |
source activate autorelease-py$(python.version)
python --version
python -m pip install -e .
conda env list
displayName: 'Install'
- bash: |
source activate autorelease-py$(python.version)
python -m pip install -r ./devtools/pip-install/full_testing.txt
python -m pip install pytest-azurepipelines
displayName: 'Install testing tools'
- bash: |
source activate autorelease-py$(python.version)
conda env list
which python
python --version
conda list
displayName: 'Versions'
- bash: |
source activate autorelease-py$(python.version)
autorelease-release -h
echo "build reason: $(Build.Reason)"
if [ $(Build.Reason) = "PullRequest" ]; then
export BRANCH=$(System.PullRequest.TargetBranch)
export EVENT="pull_request"
else
export EVENT="push" # override later if cron
export BRANCH=$(Build.SourceBranchName)
fi
if [ $(Build.Reason) = "Schedule" ]; then
export EVENT="cron"
fi
echo "BRANCH $BRANCH ; EVENT $EVENT"
python release_check.py --branch $BRANCH --event $EVENT
displayName: 'Autorelease check'
#- bash: |
#source activate autorelease-py$(python.version)
#py.test -vv --cov=autorelease --cov-report xml:cov.xml
#displayName: 'Unit tests'
#- bash: |
#bash <(curl -s https://codecov.io/bash)
#displayName: 'After success'
- template: test-conditions.yml # debugging
- template: azure_stages/deploy_testpypi.yml
- template: azure_stages/cut_release.yml
- template: azure_stages/deploy_pypi.yml