diff --git a/.github/actions/upgrade-azure-cli/action.yml b/.github/actions/upgrade-azure-cli/action.yml new file mode 100644 index 0000000000..7211bf829c --- /dev/null +++ b/.github/actions/upgrade-azure-cli/action.yml @@ -0,0 +1,13 @@ +name: Upgrade Azure CLI +description: Upgrades Azure CLI on Linux and Windows runners +runs: + using: composite + steps: + - name: Upgrade Azure CLI on Linux + if: runner.os == 'Linux' + shell: bash + run: curl -fsSL 'https://azurecliprod.blob.core.windows.net/$root/deb_install.sh' | sudo bash + - name: Upgrade Azure CLI on Windows + if: runner.os == 'Windows' + shell: pwsh + run: az upgrade --yes diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 542284e1a1..d0ff950abb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,9 @@ jobs: uses: actions/checkout@v7.0.1 with: fetch-depth: 0 + - name: Upgrade Azure CLI + if: matrix.test-category == 'AzureServiceBus' || matrix.test-category == 'AzureStorageQueues' + uses: ./.github/actions/upgrade-azure-cli - name: Move NuGet caches to the temp drive uses: ./.github/actions/nuget-cache-location - name: Setup .NET SDK @@ -96,22 +99,6 @@ jobs: background: true timeout-minutes: 5 run: dotnet build tests.proj --configuration Release -graph - # there is an issue with az cli and python 3.14, so for now we need to pin it - # once the issue is resolved it should be able to be re-floated - # https://github.com/Azure/azure-cli/issues/32980. - # This can be removed once https://github.com/Azure/azure-cli/issues/32869 is supported. - - name: Set Python 3.13 (Linux) - if: matrix.os-name == 'Linux' && matrix.test-category == 'AzureServiceBus' - uses: actions/setup-python@v5 - with: - python-version: '3.13' - - name: Install pinned Azure CLI on Python 3.13 (Linux) - if: matrix.os-name == 'Linux' && matrix.test-category == 'AzureServiceBus' - shell: bash - run: | - python -m pip install --upgrade pip - python -m pip install --user "azure-cli==2.64.0" - echo "$HOME/.local/bin" >> "$GITHUB_PATH" - name: Setup SQS environment variables if: matrix.test-category == 'SQS' run: | diff --git a/.github/workflows/container-integration-test.yml b/.github/workflows/container-integration-test.yml index 480091ea97..bf2b77f955 100644 --- a/.github/workflows/container-integration-test.yml +++ b/.github/workflows/container-integration-test.yml @@ -53,27 +53,13 @@ jobs: uses: actions/checkout@v7.0.1 with: fetch-depth: 0 + - name: Upgrade Azure CLI + if: matrix.name == 'asb' || matrix.name == 'asq' + uses: ./.github/actions/upgrade-azure-cli - name: Setup .NET SDK uses: actions/setup-dotnet@v6.0.0 with: global-json-file: global.json - - # there is an issue with az cli and python 3.14, so for now we need to pin it - # once the issue is resolved it should be able to be re-floated - # https://github.com/Azure/azure-cli/issues/32980 - - name: Set Python 3.13 (Linux) - if: matrix.name == 'asb' - uses: actions/setup-python@v5 - with: - python-version: '3.13' - - name: Install pinned Azure CLI on Python 3.13 (Linux) - if: matrix.name == 'asb' - shell: bash - run: | - python -m pip install --upgrade pip - python -m pip install --user "azure-cli==2.64.0" - echo "$HOME/.local/bin" >> "$GITHUB_PATH" - - name: Run MinVer uses: Particular/run-minver-action@v1.0.0 - name: Log in to GitHub container registry