File tree 12 files changed +434
-14
lines changed
build-publish-azure-cli-test-sdk
build-publish-azure-devops-cli-extension
download-install-local-azure-devops-cli-extension
download-install-local-azure-devops-cli-extension-with-pip
download-install-local-azure-test-sdk
install-azure-cli-released
12 files changed +434
-14
lines changed Original file line number Diff line number Diff line change
1
+
2
+ name : ' Build and Publish Azure CLI Test SDK'
3
+ description : ' Build and publish the Azure CLI Test SDK'
4
+ runs :
5
+ using : ' composite'
6
+ steps :
7
+ - run : rm -rf azure-cli
8
+ shell : bash
9
+ - run : git clone https://github.com/Azure/azure-cli.git
10
+ shell : bash
11
+ - run : pip install --upgrade .
12
+ shell : bash
13
+ working-directory : azure-cli/src/azure-cli-testsdk/
14
+ - run : python setup.py sdist bdist_wheel
15
+ shell : bash
16
+ working-directory : azure-cli/src/azure-cli-testsdk/
17
+ - uses : actions/upload-artifact@v4
18
+ with :
19
+ name : azure-cli-test-sdk
20
+ path : azure-cli/src/azure-cli-testsdk/dist
Original file line number Diff line number Diff line change
1
+
2
+ name : ' Build and Publish Azure DevOps CLI Extension'
3
+ description : ' Build and publish the Azure DevOps CLI extension'
4
+ runs :
5
+ using : ' composite'
6
+ steps :
7
+ - run : pip install --upgrade .
8
+ shell : bash
9
+ working-directory : azure-devops/
10
+ - run : python scripts/removeComments.py
11
+ shell : bash
12
+ - run : python setup.py sdist bdist_wheel
13
+ shell : bash
14
+ working-directory : azure-devops/
15
+ - uses : actions/upload-artifact@v4
16
+ with :
17
+ name : azure-devops-cli-extension
18
+ path : azure-devops/dist
Original file line number Diff line number Diff line change
1
+
2
+ name : ' Download and Install Local Azure DevOps CLI Extension with pip'
3
+ description : ' Download and install the local Azure DevOps CLI extension using pip'
4
+ runs :
5
+ using : ' composite'
6
+ steps :
7
+ - uses : actions/download-artifact@v4
8
+ with :
9
+ name : azure-devops-cli-extension
10
+ path : ${{ github.workspace }}/extension
11
+ - run : |
12
+ $extensionUninstall = az extension remove -n azure-devops
13
+ $extensions = Get-ChildItem -Filter "*.whl" -Recurse | Select-Object FullName
14
+ Foreach ($extension in $extensions)
15
+ {
16
+ Write-Host "installing " $extension.FullName
17
+ pip install $extension.FullName
18
+ }
19
+ Write-Host "done"
20
+ shell: pwsh
21
+ working-directory: ${{ github.workspace }}/extension
Original file line number Diff line number Diff line change
1
+
2
+ name : ' Download and Install Local Azure DevOps CLI Extension'
3
+ description : ' Download and install the local Azure DevOps CLI extension'
4
+ runs :
5
+ using : ' composite'
6
+ steps :
7
+ - uses : actions/download-artifact@v4
8
+ with :
9
+ name : azure-devops-cli-extension
10
+ path : ${{ github.workspace }}/extension
11
+ - run : |
12
+ $extensionUninstall = az extension remove -n azure-devops
13
+ $extensions = Get-ChildItem -Filter "*.whl" -Recurse | Select-Object FullName
14
+ Foreach ($extension in $extensions)
15
+ {
16
+ Write-Host "installing " $extension.FullName
17
+ az extension add --source $extension.FullName -y --debug
18
+ }
19
+ Write-Host "done"
20
+ shell: pwsh
21
+ working-directory: ${{ github.workspace }}/extension
Original file line number Diff line number Diff line change
1
+
2
+ name : ' Download and Install Local Azure Test SDK'
3
+ description : ' Download and install the local Azure Test SDK'
4
+ runs :
5
+ using : ' composite'
6
+ steps :
7
+ - uses : actions/download-artifact@v4
8
+ with :
9
+ name : azure-cli-test-sdk
10
+ path : ${{ github.workspace }}/wheels
11
+ - run : |
12
+ $wheels = Get-ChildItem -Filter "*.whl" -Recurse | Select-Object FullName
13
+ Foreach ($wheel in $wheels)
14
+ {
15
+ Write-Host "installing" $wheel.FullName
16
+ pip install $wheel.FullName
17
+ }
18
+ Write-Host "done"
19
+ shell: pwsh
20
+ working-directory: ${{ github.workspace }}/wheels
Original file line number Diff line number Diff line change
1
+
2
+ name : ' Install Azure CLI Edge'
3
+ description : ' Install the Azure CLI Edge version'
4
+ runs :
5
+ using : ' composite'
6
+ steps :
7
+ - run : python -m pip install --upgrade pip
8
+ shell : bash
9
+ - run : python --version
10
+ shell : bash
11
+ - run : az --version
12
+ shell : bash
13
+ - run : pip uninstall azure-cli -y
14
+ shell : bash
15
+ - run : pip install --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge --upgrade-strategy eager
16
+ shell : bash
17
+ - run : python --version
18
+ shell : bash
19
+ - run : az --version
20
+ shell : bash
Original file line number Diff line number Diff line change
1
+
2
+ name : ' Install Azure CLI released'
3
+ description : ' Install Azure CLI released version'
4
+ runs :
5
+ using : ' composite'
6
+ steps :
7
+ - run : pip install azure-cli
8
+ shell : bash
Original file line number Diff line number Diff line change
1
+
2
+ name : ' Run Tests'
3
+ description : ' Run tests with specified Python version'
4
+ inputs :
5
+ python-version :
6
+ description : ' Python version to use'
7
+ required : true
8
+ run-only-recorded-tests :
9
+ description : ' Run only recorded tests'
10
+ required : false
11
+ default : ' false'
12
+ run-with-azure-cli-released :
13
+ description : ' Run with Azure CLI released version'
14
+ required : false
15
+ default : ' false'
16
+ runs :
17
+ using : ' composite'
18
+ steps :
19
+ - uses : actions/setup-python@v2
20
+ with :
21
+ python-version : ${{ inputs.python-version }}
22
+ architecture : x64
23
+ - if : ${{ inputs.run-with-azure-cli-released == 'false' }}
24
+ uses : ./.github/actions/install-azure-cli-edge
25
+ - if : ${{ inputs.run-with-azure-cli-released == 'true' }}
26
+ uses : ./.github/actions/install-azure-cli-released
27
+ - uses : ./.github/actions/download-install-local-azure-test-sdk
28
+ - uses : ./.github/actions/setup-ci-machine
29
+ - uses : ./.github/actions/download-install-local-azure-devops-cli-extension
30
+ - run : pytest --junitxml "TEST-results.xml"
31
+ if : ${{ inputs.run-only-recorded-tests == 'false' }}
32
+ shell : bash
33
+ working-directory : azure-devops
34
+ - run : pytest tests --junitxml "TEST-results.xml"
35
+ if : ${{ inputs.run-only-recorded-tests == 'true' }}
36
+ shell : bash
Original file line number Diff line number Diff line change
1
+
2
+ name : ' Setup CI Machine'
3
+ description : ' Setup the CI machine with necessary dependencies'
4
+ runs :
5
+ using : ' composite'
6
+ steps :
7
+ - run : python -m pip install --upgrade pip
8
+ shell : bash
9
+ - run : pip install wheel==0.30.0 setuptools==70.0.0
10
+ shell : bash
11
+ - run : pip install pytest==6.2.5
12
+ shell : bash
13
+ - run : pip install coverage
14
+ shell : bash
15
+ - run : pip install pytest-cov
16
+ shell : bash
You can’t perform that action at this time.
0 commit comments