I have a YAML-pipeline that builds my code and runs some tests. My code-base is pretty huge and full of weird legacy-code that fails my unit-tests. This is why I want to track only new errors within my code, while those legacy-errors should be ignored.
- script: "nunit3-console.exe" MyAssembly.dll
displayName: 'Run unit-tests'
failOnStderr: false
continueOnError: true
When executing that script I get a partially successful build, because the exit-code of nunit is 5:
As I want only new errors to make the build fail, I also implemented a quality-gate:
- task: BuildQualityChecks@8
displayName: 'Check for test-errors'
inputs:
checkWarnings: true
warningFailOption: 'build'
warningTaskFilters: '/^Run unit-tests$/i'
warningFilters: |
/\d+\) Error :/i
/\d+\) Failed :/i
However the entire build stays "partially successfull" because of the previous task. Is there any way to ignore the outcome of the Run unit-tests
-task, as I manage them within the quality-gate ayway?