Skip to content

Commit

Permalink
update workflow files for macos (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
YanaXu authored Dec 27, 2023
1 parent 165d687 commit 45c3280
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 82 deletions.
80 changes: 0 additions & 80 deletions .github/workflows/azure-login-negative.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/azure-login-positive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 45c3280

Please sign in to comment.