-
Notifications
You must be signed in to change notification settings - Fork 247
223 lines (210 loc) · 6.82 KB
/
merge-workflow.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
name: Merge Workflow
on:
push:
branches:
- master
jobs:
Build_Publish_Azure_DevOps_CLI_Extension:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
architecture: x64
- name: Install setuptools
run: pip install setuptools==70.0.0
- uses: ./.github/actions/setup-ci-machine
- uses: ./.github/actions/build-publish-azure-devops-cli-extension
Build_Publish_Azure_CLI_Test_SDK:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
architecture: x64
- name: Install setuptools
run: pip install setuptools==70.0.0
- uses: ./.github/actions/setup-ci-machine
- uses: ./.github/actions/build-publish-azure-cli-test-sdk
Run_Test_Windows:
needs:
- Build_Publish_Azure_CLI_Test_SDK
- Build_Publish_Azure_DevOps_CLI_Extension
runs-on: windows-latest
strategy:
matrix:
python-version:
- '3.12'
- '3.11'
- '3.10'
- '3.9'
steps:
- uses: actions/checkout@v2
- name: Rename AzureCliExtensionDirectory
run: ren "C:\Program Files\Common Files\AzureCliExtensionDirectory" "C:\Program Files\Common Files\AzureCliExtensionDirectory1"
- uses: ./.github/actions/run-tests
with:
python-version: ${{ matrix.python-version }}
- name: Build wheel for Azure DevOps CLI extension
run: python setup.py sdist bdist_wheel
working-directory: azure-devops/
shell: pwsh
Run_Test_Ubuntu:
needs:
- Build_Publish_Azure_CLI_Test_SDK
- Build_Publish_Azure_DevOps_CLI_Extension
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.12'
- '3.11'
- '3.10'
- '3.9'
steps:
- uses: actions/checkout@v2
- run: sudo rm -R -f /usr/local/lib/azureExtensionDir
- uses: ./.github/actions/run-tests
with:
python-version: ${{ matrix.python-version }}
Run_Test_Mac:
needs:
- Build_Publish_Azure_CLI_Test_SDK
- Build_Publish_Azure_DevOps_CLI_Extension
runs-on: macos-13
strategy:
matrix:
python-version:
- '3.12'
- '3.11'
- '3.10'
- '3.9'
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/run-tests
with:
python-version: ${{ matrix.python-version }}
Run_Test_Mac_Azure_CLI_Released_Version:
needs: Build_Publish_Azure_CLI_Test_SDK
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/run-tests
with:
python-version: '3.12'
run-with-azure-cli-released: 'true'
Code_Coverage:
needs: Build_Publish_Azure_CLI_Test_SDK
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
architecture: x64
- uses: ./.github/actions/install-azure-cli-edge
- uses: ./.github/actions/download-install-local-azure-test-sdk
- uses: ./.github/actions/setup-ci-machine
- uses: ./.github/actions/download-install-local-azure-devops-cli-extension
- name: Run unit tests for code coverage
run: pytest --junitxml "TEST-UT-results.xml" --cov=azext_devops/dev --cov-report=xml --cov-report=html
working-directory: 'azure-devops'
- name: Install beautifulsoup4
run: pip install beautifulsoup4
- name: Fix Code Coverage Style
uses: actions/setup-python@v2
with:
script: 'scripts/fixCodeCoverageStyle.py'
- name: Publish Code Coverage Results
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: ${{ github.workspace }}/azure-devops/htmlcov
Run_Style_Check:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
architecture: x64
- name: Install setuptools
run: pip install setuptools==70.0.0
- uses: ./.github/actions/install-azure-cli-edge
- uses: ./.github/actions/download-install-local-azure-test-sdk
- uses: ./.github/actions/setup-ci-machine
- uses: ./.github/actions/download-install-local-azure-devops-cli-extension-with-pip
- name: Grant execute permission for runStyleCheck.ps1
run: chmod +x scripts/runStyleCheck.ps1
- name: Run Style Check
run: scripts/runStyleCheck.ps1
shell: pwsh
Run_HelpText_Check:
needs: Build_Publish_Azure_CLI_Test_SDK
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
architecture: x64
- name: Install setuptools
run: pip install setuptools==70.0.0
- uses: ./.github/actions/install-azure-cli-edge
- uses: ./.github/actions/download-install-local-azure-test-sdk
- uses: ./.github/actions/setup-ci-machine
- name: Install Azure DevOps CLI extension
run: pip install --upgrade .
working-directory: 'azure-devops/'
- name: Run HelpText Check
uses: actions/setup-python@v2
with:
script: 'scripts/findEmptyHelpTexts.py'
Run_Test_From_Old_Release:
if: false
needs: Build_Publish_Azure_CLI_Test_SDK
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
with:
ref: release-1.0.1
- uses: ./.github/actions/run-tests
with:
python-version: '3.12'
Check_Back_Compat_Arguments:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
architecture: x64
- uses: ./.github/actions/setup-ci-machine
- uses: ./.github/actions/install-azure-cli-edge
- name: Install setuptools
run: pip install setuptools==70.0.0
- name: Build wheel for Azure DevOps CLI extension
run: python setup.py sdist bdist_wheel
working-directory: 'azure-devops/'
- name: Run Back Compat Argument Check
uses: actions/setup-python@v2
with:
script: 'scripts/backCompatChecker.py'
Run_Markdown_Lint_Check:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install chef utils
run: gem install chef-utils -v 16.6.14
- name: Install markdown lint
run: gem install mdl
- name: Run markdown lint
run: mdl . -c .mdlrc