From 2f3f270754672142e85a415d7e885376f1c85c77 Mon Sep 17 00:00:00 2001 From: Jared Kauppila Date: Thu, 14 Mar 2019 23:45:13 -0500 Subject: [PATCH] Adds appveyor.yml config --- appveyor.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..b470dcf7e4 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,35 @@ +version: 1.0.{build} +clone_folder: c:\gopath\src\github.com\%APPVEYOR_REPO_NAME% +init: + - go version + - go env + - pwsh: Invoke-RestMethod -Method Get -Uri "https://releases.hashicorp.com/terraform/$($env:TERRAFORMVERSION)/terraform_$($env:TERRAFORMVERSION)_windows_amd64.zip" -OutFile "c:/terraform_windows_amd64.zip" + - pwsh: Expand-Archive -Path "c:/terraform_windows_amd64.zip" -Destination "C:/Tools/terraform" + - mkdir "C:/Tools/logparser" + - pwsh: Invoke-WebRequest -Method Get -Uri "https://github.com/gruntwork-io/terratest/releases/download/$($env:LOGPARSERVERSION)/terratest_log_parser_windows_amd64.exe" -OutFile "C:/Tools/logparser/terratest_log_parser.exe" + - set PATH=%PATH%;C:\Tools\terraform\;C:\Tools\logparser\ +install: + - choco install dep +environment: + GOPATH: c:\gopath + GOTESTTIMEOUT: 45m + LOGPARSERVERSION: v0.13.8 + TERRAGRUNT_DOWNLOAD: C:\.terragrunt-cache + matrix: + - TERRAFORMVERSION: 0.11.13 +build_script: + - dep ensure +test_script: + - mkdir logs + - pwsh: go test -v -parallel 1 $(go list ./... | where-object { $_ -notlike "*/test" }) | Tee-Object -FilePath 'logs/unit.log' + - terratest_log_parser.exe --testlog logs/unit.log --outputdir ./logs/unit/ + - pwsh: go test -v $(go list ./... | where-object { $_ -like "*/test" }) | Tee-Object -FilePath 'logs/integration.log' + - terratest_log_parser.exe --testlog logs/integration.log --outputdir ./logs/integration/ +artifacts: + - path: logs + name: test_logs +deploy: off +on_finish: + - ps: $wc = New-Object 'System.Net.WebClient' + - ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path ./logs/unit/report.xml)) + - ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path ./logs/integration/report.xml)) \ No newline at end of file