-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.appveyor.yml
More file actions
61 lines (53 loc) · 2.17 KB
/
.appveyor.yml
File metadata and controls
61 lines (53 loc) · 2.17 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
56
57
58
59
60
61
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
- cmd: dotnet tool install --global coverlet.console
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.Validation"
/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.xml
/d:sonar.cs.opencover.reportsPaths=%APPVEYOR_BUILD_FOLDER%\**\coverage.opencover.xml
/d:sonar.branch.name=%BranchName%
/s:%APPVEYOR_BUILD_FOLDER%\.sonarqube-analysisproperties.xml
build_script:
- dotnet build --no-incremental
test_script:
- cmd: >
coverlet
.\CSF.Validation.Tests\bin\Debug\net6.0\CSF.Validation.Tests.dll
--target "dotnet"
--targetargs "test --no-build --logger:nunit --test-adapter-path:."
-f=opencover
-o="TestResults\coverage.opencover.xml"
- sh: >
dotnet test
--test-adapter-path:.
--logger:nunit
after_test:
- cmd: >
dotnet-sonarscanner end
/d:"sonar.login=%SONARCLOUD_SECRET_KEY%"
- ps: if ($isWindows) { Tools\appveyor-upload-test-results.ps1 }
# Temporarily disabled due to #82
# - ps: if ($isWindows) { Tools\appveyor-publish-docs.ps1 }
- cmd: Tools\appveyor-create-packages.cmd