forked from elsa-workflows/elsa-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
134 lines (110 loc) · 4.14 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
image: Visual Studio 2022
environment:
elsa_version: 2.10.0
elsa_build_version: 0.0.0
nodejs_version: "19.0.1"
# AppVeyor installs Java on its build agents by default, but it
# picks an old version that's not compatible with SonarQube.
# This brings it up to date.
JAVA_HOME: "C:\\Program Files\\Java\\jdk13"
sonarcloud_org_name: elsa-workflows
sonarcloud_project_name: elsa-workflows_elsa-core
sonarcloud_api_key:
secure: qaE9kOVkGGFM7ZMf3YeliZxDU9udTCy6W5xXHJ9T+tXv5qXPMYlIdR7hyNgxW04A
init:
- cmd: set NODE_OPTIONS=--max-old-space-size=2048
- cmd: git config --global core.autocrlf true
- ps: |
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
$env:elsa_build_version=$env:APPVEYOR_REPO_TAG_NAME
}
else
{
$env:elsa_build_version="$($env:elsa_version)-preview.$($env:APPVEYOR_BUILD_NUMBER)"
}
version: 2.10.0.{build}
pull_requests:
do_not_increment_build_number: true
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
version_prefix: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
cache:
- src\designer\elsa-workflows-studio\node_modules
- src\designer\bindings\aspnet\Elsa.Designer.Components.Web\node_modules
- '%APPDATA%\npm-cache'
install:
- ps: >-
cd .\src\designer\elsa-workflows-studio
npm install --force
cd ..\bindings\aspnet\Elsa.Designer.Components.Web
npm install --force
npm install -g webpack
npm install -g webpack-cli
cd ..\..\..\..\..
dotnet tool install --global dotnet-sonarscanner
#before_build:
# - cmd: >-
# docker-compose -f docker-compose.yaml up -d mongodb postgres
#
# - ps: >-
# if(-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
# & dotnet-sonarscanner begin
# /k:$env:sonarcloud_project_name
# /v:AppVeyor_build_$env:APPVEYOR_BUILD_VERSION
# /o:$env:sonarcloud_org_name
# /s:$env:APPVEYOR_BUILD_FOLDER\.SonarQube.Analysis.xml
# /d:sonar.host.url="https://sonarcloud.io"
# /d:sonar.login=$env:sonarcloud_api_key
# /d:sonar.cs.xunit.reportsPaths=$env:APPVEYOR_BUILD_FOLDER\**\TestResults\TestResults.xml
# /d:sonar.cs.opencover.reportsPaths=$env:APPVEYOR_BUILD_FOLDER\**\TestResults\*\coverage.opencover.xml
# /d:sonar.branch.name=$env:APPVEYOR_REPO_BRANCH
# }
build_script:
- ps: >-
cd .\src\designer\elsa-workflows-studio
npm run build
cd ..\bindings\aspnet\Elsa.Designer.Components.Web
npm run build
cd ..\..\..\..\..
dotnet build
#test_script:
# - ps: dotnet test --collect:"XPlat Code Coverage" --logger:xunit -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
# - ps: dotnet test
after_test:
- ps: >-
dotnet pack Elsa.sln --include-symbols /p:Version="$env:elsa_build_version"
artifacts:
- path: '**/*.nupkg'
name: Packages
- path: '**/*.snupkg'
name: Symbol Packages
- path: '**/TestResults/TestResults.xml'
deploy:
# Deploy to NuGet on builds from tags only
- provider: NuGet
name: NuGet
api_key:
secure: uMFx5IwBzcjYIJVy+F+zbLl01Ei7MoxEOut9zWXVAu/SjaITJNTg6PAE1zFWi1TZ
skip_symbols: false
symbol_server: https://api.nuget.org/v3/index.json # remove to push symbols to SymbolSource.org
artifact: /Elsa.*(\.|\.s)nupkg/
on:
APPVEYOR_REPO_TAG: true
# Deploy to MyGet on every build (in the appropriate branch)
- provider: NuGet
name: MyGet
server: https://www.myget.org/F/elsa-2/api/v2/package
api_key:
secure: q/BL44D5KIMecFP4hzIb/OvWIZ37NfRo7PamDQv8XWfyoqCSn8F4y32wRB0ZbF0d
skip_symbols: false
symbol_server: https://www.myget.org/F/elsa-2/api/v2/symbolpackage # remove to push symbols to SymbolSource.org
artifact: /Elsa.*(\.|\.s)nupkg/
on:
branch: master