Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 12 additions & 48 deletions .github/workflows/ms.network.firewallpolicies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,36 +61,19 @@ jobs:
versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }}
customVersion: ${{ steps.get-workflow-param.outputs.customVersion }}

##################
# UNIT TESTS #
##################
# Global tests
# ------------
job_tests_module_global:
runs-on: ubuntu-20.04
name: 'Run global module tests'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Test module'
uses: ./.github/actions/templates/validateModuleGeneral
with:
modulePath: '${{ env.modulePath }}'

# Global API tests
# ----------------
job_tests_module_global_api:
####################
# Pester Tests #
####################
job_module_pester_validation:
runs-on: ubuntu-20.04
name: 'Run global API module tests'
name: 'Pester tests'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Test module'
uses: ./.github/actions/templates/validateModuleApis
- name: 'Validate module with Pester'
uses: ./.github/actions/templates/validateModulePester
with:
modulePath: '${{ env.modulePath }}'

Expand All @@ -99,11 +82,10 @@ jobs:
####################
job_module_deploy_validation:
runs-on: ubuntu-20.04
name: 'Run deployment validation module tests'
name: 'Deployment tests'
needs:
- job_set_workflow_param
- job_module_pester_validation
- job_tests_module_global_api
strategy:
fail-fast: false
matrix:
Expand All @@ -116,26 +98,9 @@ jobs:
- name: Set environment variables
uses: deep-mm/set-variables@v1.0
with:
# Name of variable file
variableFileName: 'variables.module' # Don't write .json here
# ----------- #
## Dry Run ##
# ----------- #
- name: 'Test module with parameter file [${{ matrix.parameterFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeploy
with:
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}'
managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}'
# ------------------- #
## Deploy & Remove ##
# ------------------- #
- name: 'Deploy module with parameter file [${{ matrix.parameterFilePaths }}]'
id: step_deploy
uses: ./.github/actions/templates/deployModule
variableFileName: 'variables.module'
- name: 'Using parameter file [${{ matrix.parameterFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}'
Expand Down Expand Up @@ -163,8 +128,7 @@ jobs:
- name: Set environment variables
uses: deep-mm/set-variables@v1.0
with:
# Name of variable file
variableFileName: 'variables.module' # Don't write .json here
variableFileName: 'variables.module'
- name: 'Publish module'
uses: ./.github/actions/templates/publishModule
with:
Expand Down