-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pr workflow migration changes (#1429)
* Pr workflow migration changes * Run Test fron old Release job enabled false * added if condition to make job disable
- Loading branch information
1 parent
8eb5144
commit 9d99013
Showing
12 changed files
with
434 additions
and
14 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
.github/actions/build-publish-azure-cli-test-sdk/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
name: 'Build and Publish Azure CLI Test SDK' | ||
description: 'Build and publish the Azure CLI Test SDK' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- run: rm -rf azure-cli | ||
shell: bash | ||
- run: git clone https://github.com/Azure/azure-cli.git | ||
shell: bash | ||
- run: pip install --upgrade . | ||
shell: bash | ||
working-directory: azure-cli/src/azure-cli-testsdk/ | ||
- run: python setup.py sdist bdist_wheel | ||
shell: bash | ||
working-directory: azure-cli/src/azure-cli-testsdk/ | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: azure-cli-test-sdk | ||
path: azure-cli/src/azure-cli-testsdk/dist |
18 changes: 18 additions & 0 deletions
18
.github/actions/build-publish-azure-devops-cli-extension/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
name: 'Build and Publish Azure DevOps CLI Extension' | ||
description: 'Build and publish the Azure DevOps CLI extension' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- run: pip install --upgrade . | ||
shell: bash | ||
working-directory: azure-devops/ | ||
- run: python scripts/removeComments.py | ||
shell: bash | ||
- run: python setup.py sdist bdist_wheel | ||
shell: bash | ||
working-directory: azure-devops/ | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: azure-devops-cli-extension | ||
path: azure-devops/dist |
21 changes: 21 additions & 0 deletions
21
.github/actions/download-install-local-azure-devops-cli-extension-with-pip/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
name: 'Download and Install Local Azure DevOps CLI Extension with pip' | ||
description: 'Download and install the local Azure DevOps CLI extension using pip' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: azure-devops-cli-extension | ||
path: ${{ github.workspace }}/extension | ||
- run: | | ||
$extensionUninstall = az extension remove -n azure-devops | ||
$extensions = Get-ChildItem -Filter "*.whl" -Recurse | Select-Object FullName | ||
Foreach ($extension in $extensions) | ||
{ | ||
Write-Host "installing " $extension.FullName | ||
pip install $extension.FullName | ||
} | ||
Write-Host "done" | ||
shell: pwsh | ||
working-directory: ${{ github.workspace }}/extension |
21 changes: 21 additions & 0 deletions
21
.github/actions/download-install-local-azure-devops-cli-extension/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
name: 'Download and Install Local Azure DevOps CLI Extension' | ||
description: 'Download and install the local Azure DevOps CLI extension' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: azure-devops-cli-extension | ||
path: ${{ github.workspace }}/extension | ||
- run: | | ||
$extensionUninstall = az extension remove -n azure-devops | ||
$extensions = Get-ChildItem -Filter "*.whl" -Recurse | Select-Object FullName | ||
Foreach ($extension in $extensions) | ||
{ | ||
Write-Host "installing " $extension.FullName | ||
az extension add --source $extension.FullName -y --debug | ||
} | ||
Write-Host "done" | ||
shell: pwsh | ||
working-directory: ${{ github.workspace }}/extension |
20 changes: 20 additions & 0 deletions
20
.github/actions/download-install-local-azure-test-sdk/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
name: 'Download and Install Local Azure Test SDK' | ||
description: 'Download and install the local Azure Test SDK' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: azure-cli-test-sdk | ||
path: ${{ github.workspace }}/wheels | ||
- run: | | ||
$wheels = Get-ChildItem -Filter "*.whl" -Recurse | Select-Object FullName | ||
Foreach ($wheel in $wheels) | ||
{ | ||
Write-Host "installing" $wheel.FullName | ||
pip install $wheel.FullName | ||
} | ||
Write-Host "done" | ||
shell: pwsh | ||
working-directory: ${{ github.workspace }}/wheels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
name: 'Install Azure CLI Edge' | ||
description: 'Install the Azure CLI Edge version' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- run: python -m pip install --upgrade pip | ||
shell: bash | ||
- run: python --version | ||
shell: bash | ||
- run: az --version | ||
shell: bash | ||
- run: pip uninstall azure-cli -y | ||
shell: bash | ||
- run: pip install --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge --upgrade-strategy eager | ||
shell: bash | ||
- run: python --version | ||
shell: bash | ||
- run: az --version | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
name: 'Install Azure CLI released' | ||
description: 'Install Azure CLI released version' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- run: pip install azure-cli | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
name: 'Run Tests' | ||
description: 'Run tests with specified Python version' | ||
inputs: | ||
python-version: | ||
description: 'Python version to use' | ||
required: true | ||
run-only-recorded-tests: | ||
description: 'Run only recorded tests' | ||
required: false | ||
default: 'false' | ||
run-with-azure-cli-released: | ||
description: 'Run with Azure CLI released version' | ||
required: false | ||
default: 'false' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
architecture: x64 | ||
- if: ${{ inputs.run-with-azure-cli-released == 'false' }} | ||
uses: ./.github/actions/install-azure-cli-edge | ||
- if: ${{ inputs.run-with-azure-cli-released == 'true' }} | ||
uses: ./.github/actions/install-azure-cli-released | ||
- 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 | ||
- run: pytest --junitxml "TEST-results.xml" | ||
if: ${{ inputs.run-only-recorded-tests == 'false' }} | ||
shell: bash | ||
working-directory: azure-devops | ||
- run: pytest tests --junitxml "TEST-results.xml" | ||
if: ${{ inputs.run-only-recorded-tests == 'true' }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
name: 'Setup CI Machine' | ||
description: 'Setup the CI machine with necessary dependencies' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- run: python -m pip install --upgrade pip | ||
shell: bash | ||
- run: pip install wheel==0.30.0 setuptools==70.0.0 | ||
shell: bash | ||
- run: pip install pytest==6.2.5 | ||
shell: bash | ||
- run: pip install coverage | ||
shell: bash | ||
- run: pip install pytest-cov | ||
shell: bash |
Oops, something went wrong.