coverage fixes

This commit is contained in:
Qstick 2019-08-11 15:32:55 -04:00
commit 12522b2abf
3 changed files with 8 additions and 13 deletions

View file

@ -390,12 +390,9 @@ stages:
vmImage: 'vs2017-win2016' vmImage: 'vs2017-win2016'
steps: steps:
- checkout: self - checkout: self
- task: DownloadPipelineArtifact@2 submodules: true
displayName: Download Test Artifact - bash: ./build.sh --only-backend
inputs: displayName: Build Lidarr Backend
buildType: 'current'
artifactName: Tests
targetPath: $(testsFolder)
- task: Bash@3 - task: Bash@3
displayName: Coverage Unit Tests displayName: Coverage Unit Tests
inputs: inputs:
@ -406,4 +403,4 @@ stages:
displayName: Publish Coverage Results displayName: Publish Coverage Results
inputs: inputs:
codeCoverageTool: 'cobertura' codeCoverageTool: 'cobertura'
summaryFileLocation: '**/coverage.cobertura.xml' summaryFileLocation: './Coverage.xml'

View file

@ -6,7 +6,7 @@
"build": "gulp build", "build": "gulp build",
"start": "gulp watch", "start": "gulp watch",
"watch": "gulp watch", "watch": "gulp watch",
"clean": "rimraf ./_output/UI", "clean": "git clean -fXd",
"eslint": "esprint check", "eslint": "esprint check",
"eslint-fix": "eslint --fix frontend/** ", "eslint-fix": "eslint --fix frontend/** ",
"stylelint-linux": "stylelint $(find frontend -name '*.css') --config frontend/.stylelintrc", "stylelint-linux": "stylelint $(find frontend -name '*.css') --config frontend/.stylelintrc",
@ -112,7 +112,6 @@
"redux-thunk": "2.3.0", "redux-thunk": "2.3.0",
"require-nocache": "1.0.0", "require-nocache": "1.0.0",
"reselect": "4.0.0", "reselect": "4.0.0",
"rimraf": "2.6.3",
"run-sequence": "2.2.1", "run-sequence": "2.2.1",
"signalr": "2.4.1", "signalr": "2.4.1",
"streamqueue": "1.1.2", "streamqueue": "1.1.2",

View file

@ -9,8 +9,6 @@ ASSEMBLIES=""
TEST_LOG_FILE="TestLog.txt" TEST_LOG_FILE="TestLog.txt"
COVERAGE_FILE="$TEST_DIR/Coverage.xml" COVERAGE_FILE="$TEST_DIR/Coverage.xml"
dotnet tool install --global coverlet.console
if [ -d "$TEST_DIR/_tests" ]; then if [ -d "$TEST_DIR/_tests" ]; then
TEST_DIR="$TEST_DIR/_tests" TEST_DIR="$TEST_DIR/_tests"
fi fi
@ -21,7 +19,6 @@ rm -f "$TEST_LOG_FILE"
export LIDARR_TESTS_LOG_OUTPUT="File" export LIDARR_TESTS_LOG_OUTPUT="File"
NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe" NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe"
OPEN_COVER="coverlet"
NUNIT_COMMAND="$NUNIT" NUNIT_COMMAND="$NUNIT"
NUNIT_PARAMS="--workers=1" NUNIT_PARAMS="--workers=1"
@ -60,7 +57,9 @@ done
if [ "$COVERAGE" = "Coverage" ]; then if [ "$COVERAGE" = "Coverage" ]; then
if [ "$PLATFORM" = "Windows" ] ; then if [ "$PLATFORM" = "Windows" ] ; then
$OPEN_COVER ./_tests/Lidarr.Core.Test --format "cobertura" --target "$NUNIT" --targetargs "$NUNIT_PARAMS --where=\"$WHERE\" $ASSEMBLIES"; dotnet tool install coverlet.console --tool-path=./_tests/coverlet/
OPEN_COVER="./_tests/coverlet/coverlet"
$OPEN_COVER ./_tests/ --format "cobertura" --output "$COVERAGE_FILE" --exclude "[Lidarr.*.Test]*" --exclude "[Lidarr.Test.*]*" --exclude "[Marr.Data]*" --exclude "[MonoTorrent]*" --exclude "[CurlSharp]*" --target "$NUNIT" --targetargs "$NUNIT_PARAMS --where=\"$WHERE\" $ASSEMBLIES";
EXIT_CODE=$? EXIT_CODE=$?
else else
echo "Coverage only supported on Windows" echo "Coverage only supported on Windows"