mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Add AppVeyor CI integration.
AppVeyor is a cloud-based CI platform for windows. Use [skip ci] tag in any place of message to mark commit as trivial (i.e. README.md changes).
This commit is contained in:
1 parent
49efe636d1
commit
706048344f
2 files changed
+46
No files matched your search
@@ -0,0 +1,40 @@
|
||||
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"
|
||||
.\bin\powershell.exe -c "Invoke-Pester test/powershell -OutputFormat NUnitXml -OutputFile $testResultsFile"
|
||||
(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 $_
|
||||
}
|
||||
Reference in new issue
Block a user