-
Notifications
You must be signed in to change notification settings - Fork 4
/
pipeline.yaml
100 lines (83 loc) · 2.38 KB
/
pipeline.yaml
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
# It's highly recommended to edit this in Visual Studio Code and install the azure-pipelines extension,
# then change the Language Mode (bottom right of VS Code) to Azure Pipelines instead of YAML.
name: $(Date:yyyyMMdd)$(Rev:rr)-$(Build.SourceBranchName)
trigger:
batch: true
branches:
include:
- bugfix/*
- feature/*
- release/*
exclude:
- sandbox/*
- test/*
paths:
include:
- '*' # Must quote as * is valid yaml, and we want a string
pr: none # Not supported in Azure, see: https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#pr-triggers
pool:
name: Azure Pipelines
steps:
- checkout: self
clean: true
fetchDepth: 0
fetchTags: true
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
inputs:
versionSpec: 3.12
- script: |
pip install pylint
pip install -e .
pylint ./lakeshore
displayName: 'Run PyLint'
- script: |
pip install -r docs-requirements.txt
pip install -e .
sphinx-build -W -b html ./docs ./docs/_build/html
displayName: 'Generate Docs'
- script: 'sphinx-build -W -b linkcheck ./docs ./docs/_build/linkcheck'
displayName: 'Check Links in Docs'
- script: |
pip install tox
tox
displayName: 'Run Tests'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '*_test_results.xml'
condition: succeededOrFailed()
- task: CopyFiles@2
displayName: 'Copy Files to Artifact Staging Directory for package'
inputs:
SourceFolder: .
Contents: |
lakeshore/**
setup.py
README.md
VERSION
MANIFEST.in
LICENSE
CHANGELOG.md
TargetFolder: '$(Build.ArtifactStagingDirectory)/package'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: package'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/package'
ArtifactName: package
- task: CopyFiles@2
displayName: 'Copy Files to Artifact Staging Directory for repo'
inputs:
SourceFolder: ./.git
TargetFolder: '$(Build.ArtifactStagingDirectory)/repo/.git'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: repo'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/repo'
ArtifactName: repo
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: manual'
inputs:
PathtoPublish: './docs/_build/html'
ArtifactName: manual
continueOnError: true