Edge Build CI #3303
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
name: edge-build-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 | |
- name: Installing Az CLI Edge build | |
run: | | |
cd ../.. | |
CWD="$(pwd)" | |
python3 -m venv oidc-venv | |
. oidc-venv/bin/activate | |
echo "***********activated virual environment**********" | |
python3 -m pip install --upgrade pip | |
echo "***************started installing cli edge build******************" | |
pip3 install -q --upgrade --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge --no-cache-dir --upgrade-strategy=eager | |
echo "***************installed cli Edge build*******************" | |
echo "$CWD/oidc-venv/bin" >> $GITHUB_PATH | |
az --version | |
- 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 | |
- name: Resource group scope test | |
env: | |
INPUT_SCOPE: resourcegroup | |
INPUT_SUBSCRIPTIONID: ${{ secrets.SUBSCRIPTION_ID }} | |
INPUT_RESOURCEGROUPNAME: E2eTestResourceGroupForArmAction | |
INPUT_TEMPLATE: https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.web/webapp-basic-linux/azuredeploy.json | |
INPUT_PARAMETERS: https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.web/webapp-basic-linux/azuredeploy.parameters.json | |
INPUT_DEPLOYMENTNAME: github-test-eb-rg | |
INPUT_DEPLOYMENTMODE: Complete | |
EXPECTED_TO: pass | |
run: ts-node test/main.tests.ts | |
- name: Resource group scope test - Negative | |
env: | |
INPUT_SCOPE: resourcegroup | |
INPUT_SUBSCRIPTIONID: ${{ secrets.SUBSCRIPTION_ID }} | |
INPUT_RESOURCEGROUPNAME: E2eTestResourceGroupForArmAction | |
INPUT_TEMPLATE: ./test/resourceGroup-Negative/template.json | |
INPUT_PARAMETERS: ./test/resourceGroup-Negative/parameters.json | |
INPUT_REGION: eastasia | |
INPUT_DEPLOYMENTNAME: github-test-eb-rg | |
INPUT_DEPLOYMENTMODE: Complete | |
EXPECTED_TO: fail | |
run: ts-node test/main.tests.ts | |
- name: Subscription scope test | |
env: | |
INPUT_SCOPE: subscription | |
INPUT_SUBSCRIPTIONID: ${{ secrets.SUBSCRIPTION_ID }} | |
INPUT_REGION: centralus | |
INPUT_TEMPLATE: https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/emptyrg.json | |
INPUT_PARAMETERS: rgName=demoResourceGroup rgLocation=centralus | |
INPUT_DEPLOYMENTNAME: github-test-eb-subs | |
EXPECTED_TO: pass | |
run: ts-node test/main.tests.ts | |
- name: Subscription scope test - Negative | |
env: | |
INPUT_SCOPE: subscription | |
INPUT_SUBSCRIPTIONID: ${{ secrets.SUBSCRIPTION_ID }} | |
INPUT_REGION: centralus | |
INPUT_TEMPLATE: ./test/subscription-Negative/template.json | |
INPUT_PARAMETERS: rgName=demoResourceGroup rgLocation=centralus | |
INPUT_DEPLOYMENTNAME: github-test-eb-subs | |
EXPECTED_TO: fail | |
run: ts-node test/main.tests.ts | |
- name: Validate mode test | |
env: | |
INPUT_SCOPE: resourcegroup | |
INPUT_SUBSCRIPTIONID: ${{ secrets.SUBSCRIPTION_ID }} | |
INPUT_RESOURCEGROUPNAME: E2eTestResourceGroupForArmAction | |
INPUT_TEMPLATE: https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.web/webapp-basic-linux/azuredeploy.json | |
INPUT_PARAMETERS: https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.web/webapp-basic-linux/azuredeploy.parameters.json | |
INPUT_DEPLOYMENTNAME: github-test-eb-rg | |
INPUT_DEPLOYMENTMODE: Validate | |
EXPECTED_TO: pass | |
run: ts-node test/main.tests.ts | |
- 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 }} |