forked from sebastienros/yessql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
69 lines (67 loc) · 3.15 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
image: Visual Studio 2019
skip_branch_with_pr: true
branches:
only:
- master
- dev
init:
- git config --global core.autocrlf true
# Listing all available SQL SERVER services to ensure which ones are installed on the build machines
- ps: Get-ChildItem -Path 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\' | Where-Object { $_.Name -imatch 'MSSQL[_\d]+\.SQL.*' } | ForEach-Object { Write-Host "Found $((Get-ItemProperty $_.PSPath).'(default)')" }
services:
- mysql
- postgresql96
install:
- ps: $env:BuildNumber= $env:APPVEYOR_BUILD_NUMBER
- ps: $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = true
- ps: $env:NUGET_XMLDOC_MODE = "skip"
- ps: $env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
- ps: Start-FileDownload 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe'
build_script:
- dotnet --version
before_test:
- SET SQLSERVER_2016_CONNECTION_STRING=Data Source=(local)\SQL2016;Initial Catalog=tempdb;Integrated Security=True
- SET SQLSERVER_2017_CONNECTION_STRING=Data Source=(local)\SQL2017;Initial Catalog=tempdb;Integrated Security=True
- SET SQLSERVER_2019_CONNECTION_STRING=Data Source=(local)\SQL2019;Initial Catalog=tempdb;Integrated Security=True
- SET MYSQL_CONNECTION_STRING=server=localhost;uid=root;pwd=Password12!;database=yessql;
- SET POSTGRESQL_CONNECTION_STRING=Server=localhost;Port=5432;Database=yessql;User Id=postgres;Password=Password12!;
- SET MYSQL_PWD=Password12!
- PATH=C:\Program Files\MySQL\MySQL Server 5.7\bin;%PATH%
- mysql -e "create database yessql CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" --user=root
- SET PGUSER=postgres
- SET PGPASSWORD=Password12!
- PATH=C:\Program Files\PostgreSQL\9.6\bin\;%PATH%
- createdb yessql
test_script:
- |
net start MSSQL$SQL2017
dotnet test .\test\YesSql.Tests\YesSql.Tests.csproj --filter "FullyQualifiedName~YesSql.Tests.SqlServer2017Tests" --configuration Release
net stop MSSQL$SQL2017
- |
net start MSSQL$SQL2019
dotnet test .\test\YesSql.Tests\YesSql.Tests.csproj --filter "FullyQualifiedName~YesSql.Tests.SqlServer2019Tests" --configuration Release
net stop MSSQL$SQL2019
- dotnet test .\test\YesSql.Tests\YesSql.Tests.csproj --filter "FullyQualifiedName~YesSql.Tests.MySqlTests" --configuration Release
- dotnet test .\test\YesSql.Tests\YesSql.Tests.csproj --filter "FullyQualifiedName~YesSql.Tests.SqliteTests" --configuration Release
- dotnet test .\test\YesSql.Tests\YesSql.Tests.csproj --filter "FullyQualifiedName~YesSql.Tests.PostgreSqlTests" --configuration Release
- dotnet test .\test\YesSql.Tests\YesSql.Tests.csproj --filter "FullyQualifiedName~YesSql.Tests.ProviderTests" --configuration Release
after_test:
- dotnet pack -c Release
artifacts:
- path: 'src\**\*.nupkg'
deploy:
- provider: NuGet
on:
branch: dev
server: https://www.myget.org/F/yessql/api/v2/package
api_key:
secure: 7PQvuxXn5P39X5QDlDKWbNpOKJKivpqkq7umakIirAZ12CSTAiCwjtJhSBGVboPm
skip_symbols: true
artifact: /.*\.nupkg/
- provider: NuGet
on:
branch: master
server: https://www.nuget.org/api/v2/package
api_key:
secure: m6DpgtZnDINcsZ169zpg93CxrxUQCG/QTisZM1dXQx3yF6t96fVBQwOhsm+mpG6H
skip_symbols: true