forked from vinntreus/BuildMonitor
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathappveyor.yml
34 lines (32 loc) · 2.39 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
image: Visual Studio 2017
environment:
github_token:
secure: MkekX4fNuL+MhfZYwE9xv40NFVl2PrRzIapgQVXoHnZb3aVWrgPKnoJ/PneRrLcL
code_cov_token:
secure: iXZYGk5+JJMkYPYRYhFBRXpG3KN/Q7gkyReh3hZAFYtX1p/885y1ZY6fdD1XzBSU
build_script:
# install sonarqube runner
- choco install "msbuild-sonarqube-runner" -y
- choco install opencover -y
- nuget restore "BuildMonitor.sln" -verbosity quiet
#- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { SonarQube.Scanner.MSBuild.exe begin /k:"res.configuration" /d:"sonar.host.url=https://sonarcloud.io" /d:"sonar.organization=res" /d:"sonar.login=a8e51e7eccb2eaa68c5f8d3c50e827ee2a0fa545" /d:sonar.verbose=false /d:"sonar.analysis.mode=preview" /d:"sonar.github.pullRequest=$env:APPVEYOR_PULL_REQUEST_NUMBER" /d:"sonar.github.repository=resgroup/configuration" /d:"sonar.github.oauth=$env:github_token" /d:sonar.cs.opencover.it.reportsPaths=coverage.xml }
#- ps: if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { SonarQube.Scanner.MSBuild.exe begin /k:"res.configuration" /d:"sonar.host.url=https://sonarcloud.io" /d:"sonar.organization=res" /d:"sonar.login=a8e51e7eccb2eaa68c5f8d3c50e827ee2a0fa545" /d:sonar.verbose=false /d:sonar.cs.opencover.it.reportsPaths=coverage.xml }
#- SonarQube.Scanner.MSBuild.exe begin /k:"res.configuration" /d:"sonar.host.url=https://sonarcloud.io" /d:"sonar.organization=res" /d:"sonar.login=a8e51e7eccb2eaa68c5f8d3c50e827ee2a0fa545" /d:sonar.verbose=false
- msbuild BuildMonitor.sln /p:IncludeSymbols=true /verbosity:quiet /p:Configuration=Debug
#- msbuild RES.Configuration.Test\RES.Configuration.Test.csproj /nowarn:1125 /verbosity:quiet
#- SonarQube.Scanner.MSBuild.exe end /d:"sonar.login=a8e51e7eccb2eaa68c5f8d3c50e827ee2a0fa545"
test_script:
# test and create coverage report.
OpenCover.Console.exe -register:user -target:"nunit3-console.exe" -targetargs:"BuildMonitor.UnitTests\bin\BuildMonitor.UnitTests.dll --result=myresults.xml;format=AppVeyor" -output:"coverage.xml" -returntargetcode
after_test:
# upload the code coverage to codcov.io
- ps: |
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh -f "coverage.xml"
#- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
#- pip install codecov
#- codecov -f "coverage.xml" -t %code_cov_token%
artifacts:
- path: coverage.xml
# - path: BuildMonitorPackage\obj\Release\BuildMonitorPackage.vsix