Skip to content

ci-workflow

ci-workflow #6743

Workflow file for this run

name: ci-workflow
on:
push:
schedule:
- cron: '0 */3 * * *'
workflow_dispatch:
jobs:
test_action_job:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v1
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "16.x"
- run: npm install --production
- run: sudo npm i -g ts-node
- run: npm install typescript
- name: Azure CLI Version test
env:
INPUT_AZCLIVERSION: 2.0.72
INPUT_INLINESCRIPT: |
az account show
az storage -h
EXPECTED_TO: pass
run: ts-node test/main.test.ts
- name: Azure CLI Version Test - Negative
env:
INPUT_AZCLIVERSION: 0
INPUT_INLINESCRIPT: |
az account show
az storage -h
EXPECTED_TO: fail
run: ts-node test/main.test.ts
- name: Inline Script Test - Negative
env:
INPUT_AZCLIVERSION: 2.0.72
INPUT_INLINESCRIPT: " "
EXPECTED_TO: fail
run: ts-node test/main.test.ts
- name: Post to slack on failure
if: failure()
uses: 8398a7/action-slack@v3.9.1
with:
status: ${{ job.status }}
fields: repo,message,author,action,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}