-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
223 additions
and
20 deletions.
There are no files selected for viewing
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
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
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,91 @@ | ||
name: integration-test | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 */3 * * *' | ||
|
||
jobs: | ||
basic_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: Specific test - Postive | ||
uses: azure/cli@master | ||
with: | ||
azcliversion: 2.30.0 | ||
inlineScript: | | ||
az --version | ||
az account show --output none | ||
- name: Latest version test - Postive | ||
uses: azure/cli@master | ||
with: | ||
azcliversion: latest | ||
inlineScript: | | ||
az --version | ||
az account show --output none | ||
- name: Default version test - Postive | ||
uses: azure/cli@master | ||
with: | ||
inlineScript: | | ||
az --version | ||
az account show --output none | ||
- name: Invalid Version test - Negative | ||
id: test1 | ||
continue-on-error: true | ||
uses: azure/cli@master | ||
with: | ||
azcliversion: 0 | ||
inlineScript: | | ||
az --version | ||
- name: Check Last step failed | ||
if: steps.test1.outcome == 'success' | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
core.setFailed('Last action should fail but not. Please check it.') | ||
- name: Invalid Script test - Negative | ||
id: test2 | ||
continue-on-error: true | ||
uses: azure/cli@master | ||
with: | ||
azcliversion: latest | ||
inlineScript: " " | ||
|
||
- name: Check Last step failed | ||
if: steps.test2.outcome == 'success' | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
core.setFailed('Last action should fail but not. Please check it.') | ||
os_test: | ||
environment: Automation Test | ||
runs-on: windows-latest | ||
steps: | ||
- uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: Invalid OS - Negative | ||
id: test3 | ||
continue-on-error: true | ||
uses: azure/cli@master | ||
with: | ||
azcliversion: latest | ||
inlineScript: | | ||
az --version | ||
- name: Check Last step failed | ||
if: steps.test3.outcome == 'success' | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
core.setFailed('Last action should fail but not. Please check it.') |
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,121 @@ | ||
name: pr-test | ||
on: | ||
pull_request_target: | ||
branches: | ||
- master | ||
- releases/* | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
basic_test: | ||
environment: Automation Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm i -g @vercel/ncc | ||
npm install | ||
- name: Compile files | ||
run: | | ||
ncc build -C -m src/entrypoint.ts | ||
- uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: Test - Postive | ||
uses: ./ | ||
with: | ||
azcliversion: 2.30.0 | ||
inlineScript: | | ||
az --version | ||
az account show --output none | ||
- name: Default version test - Postive | ||
uses: ./ | ||
with: | ||
inlineScript: | | ||
az --version | ||
az account show --output none | ||
- name: Invalid Version test - Negative | ||
id: test1 | ||
continue-on-error: true | ||
uses: ./ | ||
with: | ||
azcliversion: 0 | ||
inlineScript: | | ||
az --version | ||
- name: Check Last step failed | ||
if: steps.test1.outcome == 'success' | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
core.setFailed('Last action should fail but not. Please check it.') | ||
- name: Invalid Script test - Negative | ||
id: test2 | ||
continue-on-error: true | ||
uses: ./ | ||
with: | ||
azcliversion: latest | ||
inlineScript: " " | ||
|
||
- name: Check Last step failed | ||
if: steps.test2.outcome == 'success' | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
core.setFailed('Last action should fail but not. Please check it.') | ||
os_test: | ||
environment: Automation Test | ||
runs-on: windows-latest | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm i -g @vercel/ncc | ||
npm install | ||
- name: Compile files | ||
run: | | ||
ncc build -C -m src/entrypoint.ts | ||
- uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: Invalid OS - Negative | ||
id: test3 | ||
continue-on-error: true | ||
uses: ./ | ||
with: | ||
azcliversion: latest | ||
inlineScript: | | ||
az --version | ||
- name: Check Last step failed | ||
if: steps.test3.outcome == 'success' | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
core.setFailed('Last action should fail but not. Please check it.') |