elsa-core/appveyor.yml
Yopi Cahya 4933a2e81e
Upgrade all projects to .NET6.0 (#2616)
* Upgrade all projects to .NET6.0

* Add compatibility NET5.0

* Add compatibility NET Core 3.1

* Update appveyor.yml

* Update packages

* Update src/activities/Elsa.Activities.Http/Elsa.Activities.Http.csproj

Remove common Authorization package

* Update src/activities/Elsa.Activities.Http/Elsa.Activities.Http.csproj

reimplement fix for #1568

* reimplement fix for #1611

* add missing .netcoreapp3.1 references to persistence packages

* fix Jint reference

* change samples and tests to target .NET 6

* cleanup multi-targeting conditions in samples/tests

* revert Elsa and Elsa.Temporal.Common to .netstandard2.1 only

* Update docker files to use net6.0 SDK

* Fix docker poor performance on arm64

* Update Elsa.sln

* Update Elsa.Activities.RabbitMq.csproj

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Co-authored-by: Mohamed Ali <antivirus.cs@gmail.com>
2021-12-26 22:31:35 +01:00

130 lines
3.9 KiB
YAML

image: Visual Studio 2022
environment:
elsa_version: 2.4.0
elsa_build_version: 0.0.0
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
sonarcloud_project_name: elsa-workflows_elsa-core
sonarcloud_api_key:
secure: qaE9kOVkGGFM7ZMf3YeliZxDU9udTCy6W5xXHJ9T+tXv5qXPMYlIdR7hyNgxW04A
init:
- 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.4.1.{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
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: '**/TestResults/TestResults.xml'
deploy:
# Deploy to NuGet on builds from tags only
- provider: NuGet
name: NuGet
api_key:
secure: KKRDla0gYKmprH/5dN/dJag/n6uAdHU6Uq8CME4ONzz2AOsMPtzS+EI/MVuSNilD
skip_symbols: false
symbol_server: https://www.nuget.org/api/v2/symbolpackage # remove to push symbols to SymbolSource.org
artifact: /.*(\.|\.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: JfESkwmLdWU7dzvoqKPUfMemb00wX8AEYxeHCsYWTX1LfTeECdmKdZxz7IVUpebb
skip_symbols: false
symbol_server: https://www.myget.org/F/elsa-2/api/v2/symbolpackage # remove to push symbols to SymbolSource.org
artifact: /.*(\.|\.s)nupkg/
on:
branch: master