-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.appveyor.yml
More file actions
55 lines (46 loc) · 1.82 KB
/
.appveyor.yml
File metadata and controls
55 lines (46 loc) · 1.82 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: '{branch}-{build}'
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
JAVA_HOME: C:\Program Files\Java\jdk17
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
JAVA_HOME: /usr/lib/jvm/jdk15
# A note/reminder for readers: Script items prefixed "cmd:" are executed on Windows-only environments.
# Items with no prefix are run on all environments (Windows & Linux)
init:
- cmd: git config --global core.autocrlf true
install:
- cmd: dotnet tool install --global dotnet-sonarscanner
before_build:
- dotnet --version
- dotnet restore --verbosity m
- cmd: >
IF NOT DEFINED APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH (SET BranchName=%APPVEYOR_REPO_BRANCH%)
ELSE (SET BranchName=%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%)
- cmd: >
dotnet-sonarscanner begin
/k:"CSF.Specifications"
/v:AppVeyor_build_%APPVEYOR_BUILD_NUMBER%
/o:craigfowler-github
/d:sonar.host.url="https://sonarcloud.io"
/d:sonar.login=%SONARCLOUD_SECRET_KEY%
/d:sonar.cs.nunit.reportsPaths=%APPVEYOR_BUILD_FOLDER%\**\TestResults\TestResults.xml
/d:sonar.cs.opencover.reportsPaths=%APPVEYOR_BUILD_FOLDER%\**\TestResults\coverage.opencover.xml
/d:sonar.branch.name=%BranchName%
/s:%APPVEYOR_BUILD_FOLDER%\.sonarqube-analysisproperties.xml
build_script:
- dotnet build
test_script:
- >
dotnet test
/p:CollectCoverage=true
/p:CoverletOutputFormat=\"json,opencover\"
/p:CoverletOutput=\"TestResults/\"
--test-adapter-path:.
--logger:\"nunit\"
after_test:
- cmd: >
dotnet-sonarscanner end
/d:"sonar.login=%SONARCLOUD_SECRET_KEY%"
# - ps: if ($isWindows) { Tools\appveyor-publish-docs.ps1 }
# - cmd: Tools\appveyor-create-packages.cmd