From 45c3280904d6ab9d2fba45123b9e0aeb15ea9cd0 Mon Sep 17 00:00:00 2001 From: Yan Xu Date: Wed, 27 Dec 2023 14:30:51 +0800 Subject: [PATCH] update workflow files for macos (#390) --- .github/workflows/azure-login-negative.yml | 80 ---------------------- .github/workflows/azure-login-positive.yml | 4 +- 2 files changed, 2 insertions(+), 82 deletions(-) diff --git a/.github/workflows/azure-login-negative.yml b/.github/workflows/azure-login-negative.yml index e312b025a..3e6dd0c93 100644 --- a/.github/workflows/azure-login-negative.yml +++ b/.github/workflows/azure-login-negative.yml @@ -9,86 +9,6 @@ permissions: jobs: - OSTest: - runs-on: macos-latest - environment: Automation test - - steps: - - name: 'Checking out repo code' - uses: actions/checkout@v4 - - - name: Set Node.js 16.x for GitHub Action - uses: actions/setup-node@v4 - with: - node-version: 16.x - - - name: 'Validate build' - run: | - npm install - npm run build - npm run test - - - name: Login with creds - continue-on-error: true - uses: ./ - with: - creds: ${{secrets.SP1}} - enable-AzPSSession: true - - - name: Run Azure Cli - run: | - az account show --output none - az group show --name GitHubAction_CI_RG --output none - az vm list --output none - - - name: Run Azure PowerShell - id: ps_1 - continue-on-error: true - uses: azure/powershell@v1 - with: - azPSVersion: "latest" - inlineScript: | - (Get-AzContext).Environment.Name -eq 'AzureCloud' - (Get-AzResourceGroup -Name GitHubAction_CI_RG).ResourceGroupName -eq 'GitHubAction_CI_RG' - (Get-AzVM).Count -gt 0 - - - name: Check Last step failed - if: steps.ps_1.outcome == 'success' - uses: actions/github-script@v7 - with: - script: | - core.setFailed('Last action should fail but not. Please check it.') - - - name: Login with individual parameters - id: login_2 - uses: ./ - with: - client-id: ${{ secrets.OIDC_SP2_CLIENT_ID }} - tenant-id: ${{ secrets.OIDC_SP2_TENANT_ID }} - # subscription-id: ${{ secrets.OIDC_SP2_SUBSCRIPTION_ID }} - allow-no-subscriptions: true - enable-AzPSSession: true - - - name: Run Azure Cli again - run: | - az account show --output none - - - name: Run Azure PowerShell again - id: ps_2 - continue-on-error: true - uses: azure/powershell@v1 - with: - azPSVersion: "latest" - inlineScript: | - (Get-AzContext).Environment.Name -eq 'AzureCloud' - - - name: Check Last step failed - if: steps.ps_2.outcome == 'success' - uses: actions/github-script@v7 - with: - script: | - core.setFailed('Last action should fail but not. Please check it.') - PermissionTest: strategy: matrix: diff --git a/.github/workflows/azure-login-positive.yml b/.github/workflows/azure-login-positive.yml index d69e63e74..a7e960014 100644 --- a/.github/workflows/azure-login-positive.yml +++ b/.github/workflows/azure-login-positive.yml @@ -12,7 +12,7 @@ jobs: BasicTest: strategy: matrix: - os: [ubuntu-latest, windows-latest, self_linux, self_windows] + os: [ubuntu-latest, windows-latest, macos-latest, self_linux, self_windows] runs-on: ${{ matrix.os }} environment: Automation test @@ -108,7 +108,7 @@ jobs: ParameterTest: strategy: matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} environment: Automation test