diff --git a/.github/workflows/code-analysis.yml b/.github/workflows/code-analysis.yml
index f07dd302e..545cad090 100644
--- a/.github/workflows/code-analysis.yml
+++ b/.github/workflows/code-analysis.yml
@@ -2,9 +2,9 @@ name: Code analysis
on:
push:
- branches: [ main ]
+ branches: [main]
pull_request:
- branches: [ main ]
+ branches: [main]
workflow_dispatch:
jobs:
@@ -32,6 +32,7 @@ jobs:
Import-Module ConvertToSARIF -Force
Get-ChildItem -Path ./src/ -Filter *.ps* -Recurse -File |
+ Where-Object { $_.Name -ne 'Sync-WithProfiler.ps1' } |
Invoke-ScriptAnalyzer -Settings ./.github/workflows/PSScriptAnalyzerSettings.psd1 |
ConvertTo-SARIF -FilePath results.sarif
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 9e3f8f1a1..33c2cd16a 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -112,12 +112,13 @@ stages:
targetType: inline
pwsh: $(pwsh)
script: |
- & ./test.ps1 -CI -PassThru -NoBuild
+ & ./test.ps1 -CI -CC -PassThru -NoBuild
workingDirectory: '$(Build.SourcesDirectory)'
- - task: PublishCodeCoverageResults@2
+ - task: PublishCodeCoverageResults@1
inputs:
+ codeCoverageTool: 'JaCoCo'
summaryFileLocation: 'coverage.xml'
- pathToSources: 'src/'
+ pathToSources: '$(Build.SourcesDirectory)/bin/'
failIfCoverageEmpty: false
condition: succeededOrFailed()
- task: PublishTestResults@2
diff --git a/src/csharp/Pester/Pester.csproj b/src/csharp/Pester/Pester.csproj
index 131cf867e..6392dbb9f 100644
--- a/src/csharp/Pester/Pester.csproj
+++ b/src/csharp/Pester/Pester.csproj
@@ -7,6 +7,10 @@
embedded
+
+ $(DefineConstants);PESTER
+
+