forked from sunpy/sunkit-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
114 lines (97 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)
resources:
repositories:
- repository: OpenAstronomy
type: github
endpoint: sunpy
name: OpenAstronomy/azure-pipelines-templates
ref: master
trigger:
branches:
include:
- '*'
tags:
include:
- 'v*'
exclude:
- '*dev*'
- '*pre*'
- '*post*'
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- master
always: true
pr:
autoCancel: true
stages:
- stage: FirstPhaseTests
displayName: Core Tests
jobs:
- template: run-tox-env.yml@OpenAstronomy
parameters:
default_python: '3.8'
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n=4
envs:
- linux: codestyle
name: style_check
pytest: false
libraries: {}
- linux: py38
- stage: SecondPhaseTests
displayName: Stage 2 Tests
dependsOn: FirstPhaseTests
jobs:
- template: run-tox-env.yml@OpenAstronomy
parameters:
default_python: '3.8'
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n=4
libraries:
apt:
- graphviz
envs:
- macos: py37
- windows: py38
- linux: build_docs
posargs: " "
pytest: false
- linux: py38-online
- linux: py37-oldestdeps
- ${{ if or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual')) }}:
- stage: CronTests
displayName: Cron Tests
dependsOn: [] # Don't wait on other stages
jobs:
- template: run-tox-env.yml@OpenAstronomy
parameters:
default_python: '3.8'
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n=4
envs:
- linux: py38-devdeps
# On branches which aren't master, and not Pull Requests, build the wheels but only upload them on tags
- ${{ if and(ne(variables['Build.Reason'], 'PullRequest'), or(ne(variables['Build.SourceBranchName'], 'master'), eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual'))) }}:
- stage: Release
dependsOn: SecondPhaseTests
jobs:
- template: publish.yml@OpenAstronomy
parameters:
# Only Upload to PyPI on tags
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}:
pypi_connection_name : 'PyPI'
test_extras: 'tests'
test_command: 'pytest -p no:warnings --doctest-rst --pyargs sunkit_image'
submodules: false
targets:
- wheels_universal
- sdist