2016-01-22 19:36:23 +00:00
|
|
|
environment:
|
|
|
|
priv_key:
|
|
|
|
secure: <encryped-value>
|
|
|
|
|
|
|
|
install:
|
|
|
|
- ps: $fileContent = "-----BEGIN RSA PRIVATE KEY-----`n"
|
|
|
|
- ps: $fileContent += $env:priv_key.Replace(' ', "`n")
|
|
|
|
- ps: $fileContent += "`n-----END RSA PRIVATE KEY-----`n"
|
|
|
|
- ps: Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
|
|
|
|
- git config --global url.git@github.com:.insteadOf https://github.com/
|
|
|
|
- git submodule update --init --recursive -- src/monad src/windows-build test/Pester
|
|
|
|
- ps: Invoke-WebRequest -Uri https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/Latest/dotnet-win-x64.latest.zip -OutFile dotnet.zip
|
|
|
|
- 7z x dotnet.zip -odotnet > nul
|
|
|
|
|
|
|
|
build_script:
|
|
|
|
- ps: Set-Alias -Name dotnet -Value "$pwd\dotnet\bin\dotnet.exe"
|
|
|
|
- ps: dotnet restore
|
|
|
|
- ps: .\build.ps1
|
|
|
|
|
|
|
|
test_script:
|
|
|
|
- ps: |
|
|
|
|
$testResultsFile = ".\TestsResults.xml"
|
2016-02-01 21:10:39 +00:00
|
|
|
.\bin\powershell.exe --noprofile -c "Invoke-Pester test/powershell -OutputFormat NUnitXml -OutputFile $testResultsFile"
|
2016-01-22 19:36:23 +00:00
|
|
|
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile))
|
|
|
|
|
|
|
|
|
|
|
|
deploy_script:
|
|
|
|
- ps: |
|
|
|
|
# Creating project artifact
|
|
|
|
$zipFilePath = Join-Path $pwd "$(Split-Path $pwd -Leaf).zip"
|
|
|
|
Add-Type -assemblyname System.IO.Compression.FileSystem
|
|
|
|
[System.IO.Compression.ZipFile]::CreateFromDirectory("$pwd\bin", $zipFilePath)
|
|
|
|
|
|
|
|
@(
|
|
|
|
# You can add other artifacts here
|
|
|
|
$zipFilePath
|
|
|
|
) | % {
|
|
|
|
Write-Host "Pushing package $_ as Appveyor artifact"
|
|
|
|
Push-AppveyorArtifact $_
|
|
|
|
}
|