forked from python-discord/django-crispy-bulma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
103 lines (71 loc) · 2.29 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
# https://aka.ms/yaml
jobs:
- job: test
displayName: 'Lint & Test'
pool:
vmImage: 'Ubuntu 16.04'
variables:
PIP_CACHE_DIR: ".cache/pip"
steps:
- task: UsePythonVersion@0
displayName: 'Set Python version'
inputs:
versionSpec: '3.7.x'
addToPath: true
- script: pip install .[dev]
displayName: 'Install project and dev dependencies'
- script: python -m flake8
displayName: 'Run linter'
- job: build
displayName: 'Build Distribution'
dependsOn: 'test'
variables:
DJANGO_SETTINGS_MODULE: "django_crispy_bulma.settings"
steps:
- task: UsePythonVersion@0
displayName: 'Set Python version'
inputs:
versionSpec: '3.7.x'
addToPath: true
- script: pip install .[dev]
displayName: 'Install project and dev dependencies'
# region: Binary/source distributions
- script: python setup.py build sdist bdist_wheel
displayName: 'Build distribution'
- script: |
mkdir $(Build.ArtifactStagingDirectory)/build
cp -R dist/* $(Build.ArtifactStagingDirectory)/build
displayName: 'Copy artifacts'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts for release pipeline'
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/build'
artifactName: build
# endregion
# region: Documentation
- script: pdoc django_crispy_bulma --html --html-dir doc
displayName: 'Build documentation'
- script: |
mkdir $(Build.ArtifactStagingDirectory)/doc
cp -R doc/* $(Build.ArtifactStagingDirectory)/doc
displayName: 'Copy documentation'
- task: PublishBuildArtifacts@1
displayName: 'Publish documentation artifact'
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/doc'
artifactName: documentation
# endregion
# region: Version info
- script: python scripts/save-versions.py
displayName: 'Build version info'
- script: |
mkdir $(Build.ArtifactStagingDirectory)/meta
cp meta.json $(Build.ArtifactStagingDirectory)/meta
cp scripts/github-release.py $(Build.ArtifactStagingDirectory)/meta
displayName: 'Copy version info'
- task: PublishBuildArtifacts@1
displayName: 'Publish version info artifact'
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/meta'
artifactName: meta
# endregion