use the full pipeline workspace from build job

This commit is contained in:
Qstick 2019-08-11 21:42:01 -04:00
commit bdd0cfe622
2 changed files with 9 additions and 12 deletions

View file

@ -67,6 +67,9 @@ stages:
- publish: $(outputFolder)
artifact: '$(osName)Backend'
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
- publish: $(Pipeline.Workspace)
artifact: 'CoverageBuild'
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
- publish: $(testsFolder)
artifact: 'Tests'
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
@ -325,7 +328,6 @@ stages:
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/Lidarr.**.windows.zip'
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
- bash: |
ls -R ${BUILD_ARTIFACTSTAGINGDIRECTORY}
mkdir -p ./bin/
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Lidarr/. ./bin/
- task: Bash@3
@ -397,21 +399,16 @@ stages:
pool:
vmImage: 'vs2017-win2016'
steps:
- checkout: self
submodules: true
- checkout: none
#- bash: ./build.sh --only-backend
# displayName: Build Lidarr Backend
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: WindowsBackend
targetPath: _output
- task: DownloadPipelineArtifact@2
displayName: Download Test Artifact
inputs:
buildType: 'current'
artifactName: Tests
targetPath: _tests
artifactName: CoverageBuild
targetPath: $(Pipeline.Workspace)
- bash: |
ls -R ./
#- publish: $(testsFolder)
# artifact: 'CoverageTest'
- task: Bash@3

View file

@ -59,7 +59,7 @@ if [ "$COVERAGE" = "Coverage" ]; then
if [ "$PLATFORM" = "Windows" ] ; then
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";
$OPEN_COVER ./_tests/ --verbosity "detailed" --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"