forked from GoogleCloudPlatform/google-cloud-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
44 lines (42 loc) · 2.35 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
version: 1.0.{build}
branches:
only:
- master
clone_folder: C:\projects\google-cloud-powershell
environment:
ENCRYPTION_KEY:
secure: wR1u+Zd4yeQYm0EcoypygXKhUDXMAGCmNIR/pC/juWU=
matrix:
- test_folder: "PubSub"
- test_folder: "Logging"
- test_folder: "Storage"
- test_folder: "Dns"
- test_folder: "Provider"
- test_folder: "BigQuery"
- test_folder: "Compute"
- test_folder: "Compute2"
- test_folder: "SQL"
- test_folder: "SQL2"
- test_folder: "SQL3"
- test_folder: "Container"
- test_folder: "Container2"
before_build:
- nuget restore
- nuget install secure-file -ExcludeVersion
# Unencrypt the service account credentials.
- secure-file\tools\secure-file -decrypt "C:\projects\google-cloud-powershell\Google.PowerShell.IntegrationTests\ServiceAccountCredentials.json.enc" -secret %ENCRYPTION_KEY%
- secure-file\tools\secure-file -decrypt "C:\projects\google-cloud-powershell\Google.PowerShell.IntegrationTests\AdditionalServiceAccountCredentials.json.enc" -secret %ENCRYPTION_KEY%
# Install Pester.
- cinst -y pester
# Install Google Cloud SDK and set up the credentials.
- ps: . "C:\projects\google-cloud-powershell\Google.PowerShell.IntegrationTests\GcloudCmdlets.ps1"; Install-CloudSdk
- ps: Copy-Item "C:\projects\google-cloud-powershell\Google.PowerShell.IntegrationTests\ServiceAccountCredentials.json" "$env:APPDATA\gcloud\ServiceAccountCredentials.json"
- ps: $env:GOOGLE_APPLICATION_CREDENTIALS = "$env:APPDATA\gcloud\ServiceAccountCredentials.json"
- ps: Start-Process -FilePath gcloud -ArgumentList "auth activate-service-account --key-file=`"$env:GOOGLE_APPLICATION_CREDENTIALS`"" -NoNewWindow -ErrorAction Ignore
# We have to remove the generating comments part from the build to avoid permission being denied when running the executables.
- ps: (Get-Content -Raw "C:\projects\google-cloud-powershell\Google.PowerShell\Google.PowerShell.csproj").Replace('"$(SolutionDir)\third_party\XmlDoc2CmdletDoc\XmlDoc2CmdletDoc.exe" "$(TargetPath)"', "") | Out-File "C:\projects\google-cloud-powershell\Google.PowerShell\Google.PowerShell.csproj" -Encoding utf8
build:
project: C:\projects\google-cloud-powershell\Google.PowerShell\Google.PowerShell.csproj
verbosity: minimal
test_script:
- ps: . "C:\projects\google-cloud-powershell\Google.PowerShell.IntegrationTests\GcloudCmdlets.ps1"; Start-PesterTest