-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathazure-pipelines.yml
51 lines (44 loc) · 1.2 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
name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)
resources:
repositories:
- repository: OpenAstronomy
type: github
endpoint: OpenAstronomy
name: OpenAstronomy/azure-pipelines-templates
trigger:
branches:
include:
- '*'
tags:
include:
- 'v*'
exclude:
- '*dev*'
- '*pre*'
- '*post*'
jobs:
- template: run-tox-env.yml@OpenAstronomy
parameters:
submodules: false
coverage: codecov
envs:
- linux: py38-test
name: py38_test
- linux: py37-test
name: py37_test
# 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'), not(contains(variables['Build.SourceBranch'], 'master'))) }}:
- template: publish.yml@OpenAstronomy
parameters:
# Only Upload to PyPI on tags
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}:
pypi_connection_name : 'pypi_endpoint'
test_extras: 'test'
test_command: 'pytest -p no:warnings --pyargs baldrick'
submodules: false
targets:
- sdist
- wheels_universal
dependsOn:
- py37_test
- py38_test