From 12522b2abf5244cb13a3831e0dc656645a2f9788 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 11 Aug 2019 15:32:55 -0400 Subject: [PATCH] coverage fixes --- azure-pipelines.yml | 11 ++++------- package.json | 3 +-- test.sh | 7 +++---- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 486649b91..a638a31bd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -390,12 +390,9 @@ stages: vmImage: 'vs2017-win2016' steps: - checkout: self - - task: DownloadPipelineArtifact@2 - displayName: Download Test Artifact - inputs: - buildType: 'current' - artifactName: Tests - targetPath: $(testsFolder) + submodules: true + - bash: ./build.sh --only-backend + displayName: Build Lidarr Backend - task: Bash@3 displayName: Coverage Unit Tests inputs: @@ -406,4 +403,4 @@ stages: displayName: Publish Coverage Results inputs: codeCoverageTool: 'cobertura' - summaryFileLocation: '**/coverage.cobertura.xml' + summaryFileLocation: './Coverage.xml' diff --git a/package.json b/package.json index 214a3e98f..24a725ce8 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "build": "gulp build", "start": "gulp watch", "watch": "gulp watch", - "clean": "rimraf ./_output/UI", + "clean": "git clean -fXd", "eslint": "esprint check", "eslint-fix": "eslint --fix frontend/** ", "stylelint-linux": "stylelint $(find frontend -name '*.css') --config frontend/.stylelintrc", @@ -112,7 +112,6 @@ "redux-thunk": "2.3.0", "require-nocache": "1.0.0", "reselect": "4.0.0", - "rimraf": "2.6.3", "run-sequence": "2.2.1", "signalr": "2.4.1", "streamqueue": "1.1.2", diff --git a/test.sh b/test.sh index f607d4d45..dee40f9bd 100755 --- a/test.sh +++ b/test.sh @@ -9,8 +9,6 @@ ASSEMBLIES="" TEST_LOG_FILE="TestLog.txt" COVERAGE_FILE="$TEST_DIR/Coverage.xml" -dotnet tool install --global coverlet.console - if [ -d "$TEST_DIR/_tests" ]; then TEST_DIR="$TEST_DIR/_tests" fi @@ -21,7 +19,6 @@ rm -f "$TEST_LOG_FILE" export LIDARR_TESTS_LOG_OUTPUT="File" NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe" -OPEN_COVER="coverlet" NUNIT_COMMAND="$NUNIT" NUNIT_PARAMS="--workers=1" @@ -60,7 +57,9 @@ done if [ "$COVERAGE" = "Coverage" ]; 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=$? else echo "Coverage only supported on Windows"