From 5235ce23cc02cc8fbb649f8fd07889d0cb404730 Mon Sep 17 00:00:00 2001 From: Ivailo Petrov Date: Fri, 15 Mar 2019 11:14:05 -0700 Subject: [PATCH 1/5] added azure yml --- appveyor.yml | 2 +- azure-pipelines.yml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 azure-pipelines.yml diff --git a/appveyor.yml b/appveyor.yml index 75fad37..e2fe8df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,9 +9,9 @@ install: build_script: - nuget restore money/cs-money.sln + - msbuild money/cs-money.csproj /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:runCodeAnalysis=true /p:codeanalysislogfile=..\analysis.xml test_script: - - msbuild money/cs-money.csproj /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:runCodeAnalysis=true /p:codeanalysislogfile=..\analysis.xml - .\money\packages\OpenCover.4.6.519\tools\OpenCover.Console -target:".\money\packages\NUnit.ConsoleRunner.3.4.1\tools\nunit3-console.exe" -targetargs:"money\bin\Debug\cs-money.dll" -output:"coverage.xml" -filter:"+[*]* -[*]*MoneyTest*" -register:user after_test: diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..fb185a6 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,23 @@ +jobs: +- job: Windows + pool: + vmImage: 'vs2015-win2012r2' + steps: + - bash: | + wget -q https://testspace-client.s3.amazonaws.com/testspace-windows.zip + # 7z x -y testspace-windows.zip + unzip -q testspace-windows.zip + testspace config url samples.testspace.com + testspace -v + displayName: 'Setup' + - script: | + nuget restore money/cs-money.sln + msbuild money/cs-money.csproj /p:runCodeAnalysis=true /p:codeanalysislogfile=..\analysis.xml + displayName: 'Build' + - script: | + .\money\packages\OpenCover.4.6.519\tools\OpenCover.Console -target:".\money\packages\NUnit.ConsoleRunner.3.4.1\tools\nunit3-console.exe" -targetargs:"money\bin\Debug\cs-money.dll" -output:"coverage.xml" -filter:"+[*]* -[*]*MoneyTest*" -register:user + displayName: 'Test' + - script: | + testspace analysis.xml [Tests]TestResult.xml coverage.xml + condition: always() + displayName: 'Push' From d0e750653469225629f39856c0366658b6d81d06 Mon Sep 17 00:00:00 2001 From: Ivailo Petrov Date: Fri, 15 Mar 2019 11:52:06 -0700 Subject: [PATCH 2/5] use curl --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fb185a6..0023107 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,8 +4,7 @@ jobs: vmImage: 'vs2015-win2012r2' steps: - bash: | - wget -q https://testspace-client.s3.amazonaws.com/testspace-windows.zip - # 7z x -y testspace-windows.zip + curl -OsSL https://testspace-client.s3.amazonaws.com/testspace-windows.zip unzip -q testspace-windows.zip testspace config url samples.testspace.com testspace -v From 021d7cc5be32d6f221c5d6bba0426011ba8a939a Mon Sep 17 00:00:00 2001 From: Ivailo Petrov Date: Fri, 15 Mar 2019 11:56:49 -0700 Subject: [PATCH 3/5] fixed bash execution --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0023107..e9b1c01 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,8 +6,8 @@ jobs: - bash: | curl -OsSL https://testspace-client.s3.amazonaws.com/testspace-windows.zip unzip -q testspace-windows.zip - testspace config url samples.testspace.com - testspace -v + ./testspace config url samples.testspace.com + ./testspace -v displayName: 'Setup' - script: | nuget restore money/cs-money.sln From 306b090a8149f1eb6d5b98c54a92b1c37eae2160 Mon Sep 17 00:00:00 2001 From: Ivailo Petrov Date: Fri, 15 Mar 2019 12:13:20 -0700 Subject: [PATCH 4/5] use VSBuild --- azure-pipelines.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e9b1c01..944e369 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,10 +9,13 @@ jobs: ./testspace config url samples.testspace.com ./testspace -v displayName: 'Setup' - - script: | - nuget restore money/cs-money.sln - msbuild money/cs-money.csproj /p:runCodeAnalysis=true /p:codeanalysislogfile=..\analysis.xml - displayName: 'Build' + - task: VSBuild@1 + inputs: + solution: 'money\cs-money.sln' + vsVersion: '10.0' # Optional. Options: latest, 15.0, 14.0, 12.0, 11.0 + configuration: $(build.configuration) + restoreNugetPackages: true + msbuildArgs: '/p:runCodeAnalysis=true /p:codeanalysislogfile=..\analysis.xml' - script: | .\money\packages\OpenCover.4.6.519\tools\OpenCover.Console -target:".\money\packages\NUnit.ConsoleRunner.3.4.1\tools\nunit3-console.exe" -targetargs:"money\bin\Debug\cs-money.dll" -output:"coverage.xml" -filter:"+[*]* -[*]*MoneyTest*" -register:user displayName: 'Test' From 06d6508141679c06bd9460229ed34366c1700342 Mon Sep 17 00:00:00 2001 From: Ivailo Petrov Date: Fri, 15 Mar 2019 12:32:41 -0700 Subject: [PATCH 5/5] use Debug configuration --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 944e369..eac51a8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,7 +13,7 @@ jobs: inputs: solution: 'money\cs-money.sln' vsVersion: '10.0' # Optional. Options: latest, 15.0, 14.0, 12.0, 11.0 - configuration: $(build.configuration) + configuration: Debug restoreNugetPackages: true msbuildArgs: '/p:runCodeAnalysis=true /p:codeanalysislogfile=..\analysis.xml' - script: |