diff --git a/appveyor.yml b/appveyor.yml index b48834a3c..3e51685f1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,12 +10,8 @@ environment: sonarcloud_project_name: elsa-workflows_elsa-core sonarcloud_api_key: secure: qaE9kOVkGGFM7ZMf3YeliZxDU9udTCy6W5xXHJ9T+tXv5qXPMYlIdR7hyNgxW04A - -version: 2.0.0-rc1.{build} -services: - - mongodb - - postgresql101 +version: 2.0.0-rc1.{build} init: - cmd: git config --global core.autocrlf true @@ -57,47 +53,48 @@ install: # dotnet tool install --global dotnet-sonarscanner -#before_build: -# - 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 -# } - +before_build: + - cmd: docker-compose -f docker-compose.yml 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 ..\..\..\..\dashboards\blazor\ElsaDashboard.Application - + npm run build - + cd ..\..\..\..\ - + dotnet build before_test: - cmd: >- SET PGUSER=postgres - + SET PGPASSWORD=Password12! PATH=C:\Program Files\PostgreSQL\10\bin\;%PATH% - + createdb "elsa-yessql" test_script: @@ -121,7 +118,7 @@ deploy: skip_symbols: true on: branch: master - + # Deploy to NuGet on builds from tags only - provider: NuGet api_key: diff --git a/docker-compose.yaml b/docker-compose.yaml index 93ac17a72..1a5fbe0f7 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -10,7 +10,13 @@ services: - /var/lib/mongodb:/var/lib/mongodb postgres: - image: postgresql101 + image: postgres:11 + environment: + - POSTGRES_USER=root + - POSTGRES_PASSWORD=Password12! + - POSTGRES_DB=yessql + ports: + - "5432:5432" azureblobstorage: image: mcr.microsoft.com/azure-blob-storage diff --git a/test/integration/Elsa.Core.IntegrationTests/Autofixture/WithPostgresYesSqlAttribute.cs b/test/integration/Elsa.Core.IntegrationTests/Autofixture/WithPostgresYesSqlAttribute.cs index a19bce55e..d1a143d7c 100644 --- a/test/integration/Elsa.Core.IntegrationTests/Autofixture/WithPostgresYesSqlAttribute.cs +++ b/test/integration/Elsa.Core.IntegrationTests/Autofixture/WithPostgresYesSqlAttribute.cs @@ -9,24 +9,12 @@ namespace Elsa.Core.IntegrationTests.Autofixture { public class WithPostgresYesSqlAttribute : ElsaHostBuilderBuilderCustomizeAttributeBase { - /// - /// This password matches the password which is used by AppVeyor: https://www.appveyor.com/docs/services-databases/#postgresql - /// - /// - /// - /// We could do something more sophisticated with the password than keep it in a constant, but since - /// this is (so far) the only place where we configure Postgres. There aren't any plans to do anything - /// with it in the foreseeable future either, so we can defer that until then. - /// - /// - internal const string PostgresPassword = "Password12!"; - public override Action GetBuilderCustomizer() { return builder => { builder.ElsaCallbacks.Add(elsa => { - elsa.UseYesSqlPersistence((IServiceProvider services, IConfiguration config) => { - config.UsePostgreSql($"Host=localhost;Database=elsa-yessql;User ID=postgres;Password={PostgresPassword}"); + elsa.UseYesSqlPersistence((_, config) => { + config.UsePostgreSql($"Server=localhost;Port=5432;Database=yessql;User Id=root;Password=Password12!;"); }); }); };