-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write Test Case For Azure cli Action #48
Conversation
src/main.ts
Outdated
@@ -21,15 +22,18 @@ const run = async () => { | |||
} | |||
|
|||
let inlineScript: string = core.getInput('inlineScript', { required: true }); | |||
let azcliversion: string = core.getInput('azcliversion', { required: true }).trim().toLowerCase(); | |||
|
|||
let azcliversion: string = core.getInput('azcliversion', { required: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add .trim().toLowerCase()
back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added .trim().toLowerCase()
src/main.ts
Outdated
if (!(await checkIfValidCLIVersion(azcliversion))) { | ||
console.log("INVALID VERSION") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this console.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/main.ts
Outdated
core.setFailed('Please enter a valid azure cli version. \nSee available versions: https://github.com/Azure/azure-cli/releases.'); | ||
throw new Error('Please enter a valid azure cli version. \nSee available versions: https://github.com/Azure/azure-cli/releases.') | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/main.ts
Outdated
return; | ||
} | ||
|
||
if (!inlineScript.trim()) { | ||
core.setFailed('Please enter a valid script.'); | ||
throw new Error('Please enter a valid script.') | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1,47 @@ | |||
name: ci-workflow | |||
on: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace on with this -
on:
push:
schedule:
- cron: '0 */3 * * *'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
INPUT_INLINESCRIPT: " " | ||
EXPECTED_TO: fail | ||
run: ts-node test/main.test.ts | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add post status action at the end
- name: Post to slack on failure
if: failure()
uses: 8398a7/[email protected]
with:
status: ${{ job.status }}
fields: repo,message,author,action,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
This PR is idle because it has been open for 14 days with no activity. |
* Updated Readme for Azure CLI actions (#29) * Update README.md * Update README.md Co-authored-by: Usha N <[email protected]> * Add changes * Added add-label workflow (#41) * Added add-label workflow * Updated default label worlkflow for health dashboard * Reduced time * Added issue template for health dashboard (#42) * Added issue template for health dashboard * Added assignees * Add 'getting help' section to point customers to Azure CLI Repo for help (#50) Signed-off-by: James Casey <[email protected]> * Write Test Case For Azure cli Action (#48) * Create main.test.ts * Create ci-workflow.yml * Update main.ts * Update ci-workflow.yml * Update main.ts * Update ci-workflow.yml * Update ci-workflow.yml * Resolved multiple README issues (#51) * Resolved multiple issues * revert * Changed default for azcliversion. (#57) * Added restrictLatestToAgent * typo * required set to false * Changed default to agent az cli version * deleted lib files * Resolved comments * Add changes * Update package.json * Update package-lock.json * Upgrade version (#59) * Revert "Update package-lock.json" This reverts commit 5633362. * Revert "Update package.json" This reverts commit f4b36bb. * Upgrade version in packkage.json Co-authored-by: Zainudeen V K <[email protected]> Co-authored-by: Usha N <[email protected]> Co-authored-by: GitHub Action <[email protected]> Co-authored-by: James Casey <[email protected]> Co-authored-by: PankajGovindRao <[email protected]>
Test Case For Azure cli Action