代码拉取完成,页面将自动刷新
同步操作将从 LongbowEnterprise/BootstrapAdmin 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
function installDB() {
write-host "init sqlserver database..." -ForegroundColor Cyan
$startPath = "$($env:appveyor_build_folder)\db\SqlServer"
$sqlInstance = "(local)\SQL2017"
$outFile = join-path $startPath "output.log"
$sqlFile = join-path $startPath "Install.sql"
$initFile = join-path $startPath "InitData.sql"
sqlcmd -S "$sqlInstance" -U sa -P Password12! -i "$sqlFile" -i "$initFile" -o "$outFile"
#write-host "init mysql database..." -ForegroundColor Cyan
#$env:MYSQL_PWD="Password12!"
#$mysql = '"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe"'
#$cmd = $mysql + ' -e "create database BootstrapAdmin;" -uroot'
#cmd.exe /c $cmd
#$startPath = "$($env:appveyor_build_folder)\db\MySQL"
#$para = ' -hlocalhost -uroot -DBootstrapAdmin < '
#$sqlFile = join-path $startPath "Install.sql"
#$cmd = $mysql + $para + $sqlFile
#cmd.exe /c $cmd
#$initFile = join-path $startPath "InitData.sql"
#$cmd = $mysql + $para + $initFile
#cmd.exe /c $cmd
write-host "init mongodb data..." -ForegroundColor Cyan
$initFolder = "$($env:appveyor_build_folder)\db\MongoDB"
cd $initFolder
cmd.exe /c "C:\mongodb\bin\mongo init.js"
$cmd = 'C:\mongodb\bin\mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())"'
iex "& $cmd"
cd $($env:appveyor_build_folder)
}
function runUnitTest() {
write-host "dotnet test test\UnitTest" -ForegroundColor Cyan
dotnet test test\UnitTest --filter="FullyQualifiedName!~MySql" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include="[Bootstrap.Admin*]*%2c[Bootstrap.DataAccess*]*" /p:Exclude="[*]*Program%2c[*]*Startup%2c[Bootstrap.DataAccess]*AutoDB%2c[Bootstrap.DataAccess]*WeChatHelper" /p:ExcludeByFile="**/SMSExtensions.cs%2c**/Helper/OAuthHelper.cs%2c**/Extensions/CloudLoggerExtensions.cs%2c**/Extensions/AutoGenerateDatabaseExtensions.cs" /p:CoverletOutput=..\..\
}
function coverallUnitTest() {
write-host "install coveralls.net tools" -ForegroundColor Cyan
dotnet tool install coveralls.net --version 1.0.0 --tool-path ".\tools"
runUnitTest
write-host "report UnitTest with Coveralls" -ForegroundColor Cyan
cmd.exe /c ".\tools\csmacnz.Coveralls.exe --opencover -i coverage.opencover.xml --useRelativePaths"
}
function codecovUnitTest() {
Set-AppveyorBuildVariable COVERALLS_REPO_TOKEN $($env:COVERALLS_REPO_TOKEN)
Set-AppveyorBuildVariable CODECOV_TOKEN $($env:CODECOV_TOKEN)
$codecovCmd = "C:\ProgramData\chocolatey\lib\codecov\tools\codecov.exe"
$codecov = Test-Path $codecovCmd
if (!$codecov) {
write-host "install codecov tools" -ForegroundColor Cyan
choco install codecov
}
$coverageFile = Test-Path coverage.opencover.xml
if (!$coverageFile) {
runUnitTest
}
write-host "report UnitTest with Codecov" -ForegroundColor Cyan
cmd.exe /c "$codecovCmd -f ""coverage.opencover.xml"""
}
$branch = $($env:APPVEYOR_REPO_BRANCH)
if ($branch -ne "dev") {
installDB
coverallUnitTest
codecovUnitTest
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。