Skip to content

Commit b2537e7

Browse files
authored
Merge workflow changes (#1430)
1 parent 9d99013 commit b2537e7

File tree

1 file changed

+223
-0
lines changed

1 file changed

+223
-0
lines changed
Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
name: Merge Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
Build_Publish_Azure_DevOps_CLI_Extension:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.12'
17+
architecture: x64
18+
- name: Install setuptools
19+
run: pip install setuptools==70.0.0
20+
- uses: ./.github/actions/setup-ci-machine
21+
- uses: ./.github/actions/build-publish-azure-devops-cli-extension
22+
23+
Build_Publish_Azure_CLI_Test_SDK:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Set up Python
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: '3.12'
31+
architecture: x64
32+
- name: Install setuptools
33+
run: pip install setuptools==70.0.0
34+
- uses: ./.github/actions/setup-ci-machine
35+
- uses: ./.github/actions/build-publish-azure-cli-test-sdk
36+
37+
Run_Test_Windows:
38+
needs:
39+
- Build_Publish_Azure_CLI_Test_SDK
40+
- Build_Publish_Azure_DevOps_CLI_Extension
41+
runs-on: windows-latest
42+
strategy:
43+
matrix:
44+
python-version:
45+
- '3.12'
46+
- '3.11'
47+
- '3.10'
48+
- '3.9'
49+
steps:
50+
- uses: actions/checkout@v2
51+
- name: Rename AzureCliExtensionDirectory
52+
run: ren "C:\Program Files\Common Files\AzureCliExtensionDirectory" "C:\Program Files\Common Files\AzureCliExtensionDirectory1"
53+
- uses: ./.github/actions/run-tests
54+
with:
55+
python-version: ${{ matrix.python-version }}
56+
- name: Build wheel for Azure DevOps CLI extension
57+
run: python setup.py sdist bdist_wheel
58+
working-directory: azure-devops/
59+
shell: pwsh
60+
61+
Run_Test_Ubuntu:
62+
needs:
63+
- Build_Publish_Azure_CLI_Test_SDK
64+
- Build_Publish_Azure_DevOps_CLI_Extension
65+
runs-on: ubuntu-latest
66+
strategy:
67+
matrix:
68+
python-version:
69+
- '3.12'
70+
- '3.11'
71+
- '3.10'
72+
- '3.9'
73+
steps:
74+
- uses: actions/checkout@v2
75+
- run: sudo rm -R -f /usr/local/lib/azureExtensionDir
76+
- uses: ./.github/actions/run-tests
77+
with:
78+
python-version: ${{ matrix.python-version }}
79+
80+
Run_Test_Mac:
81+
needs:
82+
- Build_Publish_Azure_CLI_Test_SDK
83+
- Build_Publish_Azure_DevOps_CLI_Extension
84+
runs-on: macos-13
85+
strategy:
86+
matrix:
87+
python-version:
88+
- '3.12'
89+
- '3.11'
90+
- '3.10'
91+
- '3.9'
92+
steps:
93+
- uses: actions/checkout@v2
94+
- uses: ./.github/actions/run-tests
95+
with:
96+
python-version: ${{ matrix.python-version }}
97+
98+
Run_Test_Mac_Azure_CLI_Released_Version:
99+
needs: Build_Publish_Azure_CLI_Test_SDK
100+
runs-on: macos-latest
101+
steps:
102+
- uses: actions/checkout@v2
103+
- uses: ./.github/actions/run-tests
104+
with:
105+
python-version: '3.12'
106+
run-with-azure-cli-released: 'true'
107+
108+
Code_Coverage:
109+
needs: Build_Publish_Azure_CLI_Test_SDK
110+
runs-on: macOS-latest
111+
steps:
112+
- uses: actions/checkout@v2
113+
- name: Set up Python
114+
uses: actions/setup-python@v2
115+
with:
116+
python-version: '3.12'
117+
architecture: x64
118+
- uses: ./.github/actions/install-azure-cli-edge
119+
- uses: ./.github/actions/download-install-local-azure-test-sdk
120+
- uses: ./.github/actions/setup-ci-machine
121+
- uses: ./.github/actions/download-install-local-azure-devops-cli-extension
122+
- name: Run unit tests for code coverage
123+
run: pytest --junitxml "TEST-UT-results.xml" --cov=azext_devops/dev --cov-report=xml --cov-report=html
124+
working-directory: 'azure-devops'
125+
- name: Install beautifulsoup4
126+
run: pip install beautifulsoup4
127+
- name: Fix Code Coverage Style
128+
uses: actions/setup-python@v2
129+
with:
130+
script: 'scripts/fixCodeCoverageStyle.py'
131+
- name: Publish Code Coverage Results
132+
uses: actions/upload-artifact@v4
133+
with:
134+
name: code-coverage
135+
path: ${{ github.workspace }}/azure-devops/htmlcov
136+
137+
Run_Style_Check:
138+
runs-on: macOS-latest
139+
steps:
140+
- uses: actions/checkout@v2
141+
- name: Set up Python
142+
uses: actions/setup-python@v2
143+
with:
144+
python-version: '3.12'
145+
architecture: x64
146+
- name: Install setuptools
147+
run: pip install setuptools==70.0.0
148+
- uses: ./.github/actions/install-azure-cli-edge
149+
- uses: ./.github/actions/download-install-local-azure-test-sdk
150+
- uses: ./.github/actions/setup-ci-machine
151+
- uses: ./.github/actions/download-install-local-azure-devops-cli-extension-with-pip
152+
- name: Grant execute permission for runStyleCheck.ps1
153+
run: chmod +x scripts/runStyleCheck.ps1
154+
- name: Run Style Check
155+
run: scripts/runStyleCheck.ps1
156+
shell: pwsh
157+
158+
Run_HelpText_Check:
159+
needs: Build_Publish_Azure_CLI_Test_SDK
160+
runs-on: macOS-latest
161+
steps:
162+
- uses: actions/checkout@v2
163+
- name: Set up Python
164+
uses: actions/setup-python@v2
165+
with:
166+
python-version: '3.12'
167+
architecture: x64
168+
- name: Install setuptools
169+
run: pip install setuptools==70.0.0
170+
- uses: ./.github/actions/install-azure-cli-edge
171+
- uses: ./.github/actions/download-install-local-azure-test-sdk
172+
- uses: ./.github/actions/setup-ci-machine
173+
- name: Install Azure DevOps CLI extension
174+
run: pip install --upgrade .
175+
working-directory: 'azure-devops/'
176+
- name: Run HelpText Check
177+
uses: actions/setup-python@v2
178+
with:
179+
script: 'scripts/findEmptyHelpTexts.py'
180+
181+
Run_Test_From_Old_Release:
182+
if: false
183+
needs: Build_Publish_Azure_CLI_Test_SDK
184+
runs-on: macOS-latest
185+
steps:
186+
- uses: actions/checkout@v4
187+
with:
188+
ref: release-1.0.1
189+
- uses: ./.github/actions/run-tests
190+
with:
191+
python-version: '3.12'
192+
193+
Check_Back_Compat_Arguments:
194+
runs-on: windows-latest
195+
steps:
196+
- uses: actions/checkout@v2
197+
- name: Set up Python
198+
uses: actions/setup-python@v2
199+
with:
200+
python-version: '3.12'
201+
architecture: x64
202+
- uses: ./.github/actions/setup-ci-machine
203+
- uses: ./.github/actions/install-azure-cli-edge
204+
- name: Install setuptools
205+
run: pip install setuptools==70.0.0
206+
- name: Build wheel for Azure DevOps CLI extension
207+
run: python setup.py sdist bdist_wheel
208+
working-directory: 'azure-devops/'
209+
- name: Run Back Compat Argument Check
210+
uses: actions/setup-python@v2
211+
with:
212+
script: 'scripts/backCompatChecker.py'
213+
214+
Run_Markdown_Lint_Check:
215+
runs-on: windows-latest
216+
steps:
217+
- uses: actions/checkout@v2
218+
- name: Install chef utils
219+
run: gem install chef-utils -v 16.6.14
220+
- name: Install markdown lint
221+
run: gem install mdl
222+
- name: Run markdown lint
223+
run: mdl . -c .mdlrc

0 commit comments

Comments
 (0)