forked from kenfus/radiospectra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
131 lines (110 loc) · 3.01 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- main
always: true
resources:
repositories:
- repository: OpenAstronomy
type: github
endpoint: sunpy
name: OpenAstronomy/azure-pipelines-templates
ref: master
trigger:
branches:
include:
- '*'
exclude:
- '*backport*'
tags:
include:
- 'v*'
exclude:
- '*dev*'
- '*pre*'
- '*post*'
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
libraries:
apt:
- libopenjp2-7
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:
- libopenjp2-7
- graphviz
brew:
- openjpeg
envs:
- macos: py37
- windows: py39
- linux: build_docs
posargs: " "
pytest: false
- linux: py38-online
- linux: py37-oldestdeps
- linux: py38-conda
libraries: {}
- ${{ 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
libraries:
apt:
- libopenjp2-7
envs:
- linux: py38-devdeps
# On branches which aren't main, 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'], 'main'), 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: 'dev'
test_command: 'pytest -p no:warnings --doctest-rst --pyargs radiospectra'
submodules: false
targets:
- wheels_universal
- sdist