elsa-core/appveyor.yml

123 lines
3.3 KiB
YAML
Raw Normal View History

image: Previous Visual Studio 2019
environment:
nodejs_version: "14.6.0"
# 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
2021-02-27 14:38:42 +00:00
sonarcloud_project_name: elsa-workflows_elsa-core
sonarcloud_api_key:
secure: qaE9kOVkGGFM7ZMf3YeliZxDU9udTCy6W5xXHJ9T+tXv5qXPMYlIdR7hyNgxW04A
2021-05-28 17:18:21 +00:00
version: 2.1.0-preview.{build}
init:
- cmd: git config --global core.autocrlf true
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:
2021-04-06 08:52:26 +00:00
- src\designer\elsa-workflows-studio\node_modules
2021-04-26 08:37:33 +00:00
- src\designer\bindings\aspnet\Elsa.Designer.Components.Web\node_modules
- src\dashboards\blazor\ElsaDashboard.Application\node_modules
- '%APPDATA%\npm-cache'
install:
- ps: >-
2021-04-06 08:52:26 +00:00
cd .\src\designer\elsa-workflows-studio
2021-04-06 08:52:26 +00:00
npm install --force
2021-04-26 08:37:33 +00:00
cd ..\bindings\aspnet\Elsa.Designer.Components.Web
npm install --force
2021-04-06 08:52:26 +00:00
cd ..\..\..\..\dashboards\blazor\ElsaDashboard.Application
2021-03-17 22:02:38 +00:00
npm install --force
2021-04-06 08:52:26 +00:00
cd ..\..\..\..
2021-05-26 10:31:04 +00:00
dotnet tool install --global dotnet-sonarscanner
2021-05-06 20:17:41 +00:00
before_build:
- cmd: >-
docker-compose -f docker-compose.yaml up -d mongodb postgres
2021-05-26 10:31:04 +00:00
- 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
}
2021-04-01 09:05:58 +00:00
build_script:
- ps: >-
2021-04-06 08:52:26 +00:00
cd .\src\designer\elsa-workflows-studio
npm run build
2021-04-26 08:37:33 +00:00
cd ..\bindings\aspnet\Elsa.Designer.Components.Web
npm run build
cd ..\..\..\..\dashboards\blazor\ElsaDashboard.Application
2021-04-01 09:05:58 +00:00
npm run build
cd ..\..\..\..\
2021-04-01 09:05:58 +00:00
dotnet build
2021-05-06 20:17:41 +00:00
# before_test:
test_script:
- ps: dotnet test --collect:"XPlat Code Coverage" --logger:xunit -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
after_test:
- ps: >-
2021-04-06 08:27:53 +00:00
dotnet pack Elsa.sln --include-symbols /p:Version="$env:APPVEYOR_BUILD_VERSION"
artifacts:
- path: '**/*.nupkg'
name: Packages
- path: '**/TestResults/TestResults.xml'
deploy:
# Deploy to MyGet on every build (in the appropriate branch)
- provider: NuGet
server: https://www.myget.org/F/elsa-2/api/v2/package
api_key:
secure: JfESkwmLdWU7dzvoqKPUfMemb00wX8AEYxeHCsYWTX1LfTeECdmKdZxz7IVUpebb
skip_symbols: true
on:
2021-05-04 09:06:16 +00:00
branch: master
# Deploy to NuGet on builds from tags only
- provider: NuGet
api_key:
secure: WC5CCcM5ksWOJbv925FNjv91KsfqHfwEe0A61FMNB27IxvttwJsvBC9XYwK+wQnp
skip_symbols: true
on:
2021-05-04 09:06:16 +00:00
branch: master
2021-04-02 11:23:04 +00:00
APPVEYOR_REPO_TAG: true