Skip to content

Merge pull request #5491 from NikCharlebois/AADRoleManagementPolicyRu… #2998

Merge pull request #5491 from NikCharlebois/AADRoleManagementPolicyRu…

Merge pull request #5491 from NikCharlebois/AADRoleManagementPolicyRu… #2998

Workflow file for this run

name: Code Coverage
on: [push]
jobs:
# This workflow contains a single job called "build"
CodeCoverage:
# The type of runner that the job will run on
runs-on: windows-latest
# Only when run from the main repo
if: github.repository == 'microsoft/Microsoft365DSC'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install Modules
shell: pwsh
run: |
Install-PSResource -Name ReverseDSC -Scope AllUsers -TrustRepository
Install-PSResource -Name DSCParser -Scope AllUsers -TrustRepository
Install-PSResource -Name PSDesiredStateConfiguration -Scope AllUsers -TrustRepository
Install-PSResource -Name Pester -Scope AllUsers -TrustRepository
[System.Environment]::SetEnvironmentVariable('M365DSCTelemetryEnabled', $false, [System.EnvironmentVariableTarget]::Machine);
- name: Run Quality Checks
shell: pwsh
run: |
Import-Module './Tests/TestHarness.psm1' -Force;
$MaximumFunctionCount = 32767
try
{
$results = Invoke-QualityChecksHarness
}
catch
{
$MaximumFunctionCount = 32767
Import-Module './Tests/TestHarness.psm1' -Force;
$results = Invoke-QualityChecksHarness
}
if ($results.FailedCount -gt 0)
{
throw "{$($results.FailedCount)} Quality Check(s) Failed"
}
- name: Run Test Harness
shell: pwsh
run: |
Import-Module './Tests/TestHarness.psm1' -Force;
$MaximumFunctionCount = 32767
try
{
$results = Invoke-TestHarness
}
catch
{
$MaximumFunctionCount = 32767
Import-Module './Tests/TestHarness.psm1' -Force;
$results = Invoke-TestHarness
}
if ($results.FailedCount -gt 0)
{
throw "{$($results.FailedCount)} Unit Test(s) Failed"
}
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./CodeCov.xml