-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.appveyor.yml
63 lines (55 loc) · 2.08 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
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
62
63
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
JAVA_HOME: C:\Program Files\Java\jdk17
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204
JAVA_HOME: /usr/lib/jvm/jdk15
skip_branch_with_pr: true
# A note/reminder for readers: Script items prefixed "cmd:" are executed on Windows-only environments.
# Items with no prefix (or "ps:" 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
- cmd: dotnet tool update -g docfx
- ps: |
cd CSF.Screenplay.JsonToHtmlReport.Template\src
npm ci
cd ..\..
before_build:
- dotnet --version
- dotnet restore --verbosity m
- dotnet clean
- 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-dev_CSF.Screenplay"
/v:AppVeyor_build_%APPVEYOR_BUILD_NUMBER%
/o:craigfowler-github
/d:sonar.host.url=https://sonarcloud.io
/d:sonar.token=%SONARCLOUD_SECRET_KEY%
/d:sonar.branch.name=%BranchName%
/d:sonar.javascript.lcov.reportPaths=%APPVEYOR_BUILD_FOLDER%\CSF.Screenplay.JsonToHtmlReport.Template\src\TestResults\lcov.info
/s:%APPVEYOR_BUILD_FOLDER%\.sonarqube-analysisproperties.xml
build_script:
- dotnet build --no-incremental
test_script:
- ps: if ($isWindows) { Tools\run-tests-with-coverage.ps1 }
- sh: >
dotnet test
--test-adapter-path:.
--logger:nunit
- ps: |
cd CSF.Screenplay.JsonToHtmlReport.Template\src
npm test
cd ..\..
after_test:
- cmd: >
dotnet-sonarscanner end
/d:"sonar.token=%SONARCLOUD_SECRET_KEY%"
- ps: if ($isWindows) { Tools\appveyor-upload-test-results.ps1 }
- cmd: dotnet build -c Docs
- ps: if ($isWindows) { Tools\appveyor_publish_docs.ps1 }