-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.appveyor.yml
35 lines (35 loc) · 1.49 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
clone_depth: 1
platform:
- x64
services:
- mysql
- mssql2016
environment:
MYSQL_VERSION: 5.7
MYSQL_SERVICE: MySQL57
MYSQL_USER: root
MYSQL_PWD: 'Password12!'
MSSQL_VERSION: SQL2016
MSSQL_USER: sa
MSSQL_PWD: 'Password12!'
MSSQL_BAK: WideWorldImporters-Standard.bak
MSSQL_DATABASE: WideWorldImporters
MSSQL_TABLE: Sales.Customers
init:
- ps: $env:DIR="$env:APPVEYOR_BUILD_FOLDER\.appveyor\"
- ps: $env:PATH="$env:PATH;$env:APPVEYOR_BUILD_FOLDER\;$env:DIR;$env:PROGRAMFILES\MySQL\MySQL Server $env:MYSQL_VERSION\bin\"
install:
- ps: start_mssql.ps1 $env:MSSQL_VERSION
- ps: start_mysql.ps1 $env:MYSQL_VERSION $env:MYSQL_SERVICE
- ps: Invoke-WebRequest https://github.com/Microsoft/sql-server-samples/releases/download/wide-world-importers-v1.0/$env:MSSQL_BAK -OutFile $env:DIR\$env:MSSQL_BAK
- ps: replace_all.ps1 $env:DIR\import_wwi.sql C:\WideWorldImporters\ $env:DIR
- cmd: sqlcmd -i %DIR%\import_wwi.sql
build_script:
- ps: GetMsSqlDump.ps1 -db $env:MSSQL_DATABASE -table $env:MSSQL_TABLE -username $env:MSSQL_USER -password "$env:MSSQL_PWD" -debug -pointfromtext -file $env:DIR\$env:MSSQL_TABLE.sql
- cmd: mysql --host=localhost --user=%MYSQL_USER% < %DIR%\mysql_create_table.sql
- cmd: mysql --host=localhost --user=%MYSQL_USER% %MSSQL_DATABASE% < %DIR%\%MSSQL_TABLE%.sql
- cmd: mysql --host=localhost --user=%MYSQL_USER% %MSSQL_DATABASE% -Nse "SELECT COUNT(1) FROM Sales_Customers;"
artifacts:
- path: '**\$(MSSQL_TABLE).sql'
name: $(MSSQL_TABLE).sql
type: File