-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
# Install gcc TODO: Move to the VM image | ||
choco install mingw | ||
|
||
# Install gvm and go | ||
# TODO: Move GVM download to the base VM image | ||
$env:GvmVersion = "0.5.2" | ||
$Env:GOTMPDIR = $Env:BUILDKITE_BUILD_CHECKOUT_PATH #https://github.com/golang/go/issues/42224#issuecomment-1021149948 | ||
$Env:GOPATH = "$Env:BUILDKITE_BUILD_CHECKOUT_PATH\gopath" | ||
|
||
[Net.ServicePointManager]::SecurityProtocol = "tls12" | ||
$env:GoVersion = Get-Content -Path .go-version | ||
Invoke-WebRequest -URI https://github.com/andrewkroh/gvm/releases/download/v$env:GvmVersion/gvm-windows-amd64.exe -Outfile C:\Windows\System32\gvm.exe | ||
gvm --format=powershell $env:GoVersion | Invoke-Expression | ||
go version | ||
|
||
$GOPATH = $(go env GOPATH) | ||
$env:Path = "$GOPATH\bin;" + $env:Path | ||
[Environment]::SetEnvironmentVariable("GOPATH", "$GOPATH", [EnvironmentVariableTarget]::Machine) | ||
[Environment]::SetEnvironmentVariable("Path", "$GOPATH\bin;$env:Path", [EnvironmentVariableTarget]::Machine) | ||
|
||
# Install tools | ||
go install github.com/magefile/mage | ||
go install github.com/elastic/go-licenser | ||
go install golang.org/x/tools/cmd/goimports | ||
go install github.com/jstemmer/go-junit-report | ||
go install gotest.tools/gotestsum | ||
|
||
# debug | ||
Write-Host "GOPATH: $env:GOPATH" | ||
#Get-ChildItem -Path $env:GOPATH\bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
$ErrorActionPreference = "Stop" | ||
Write-Host "--- Unit tests" | ||
#debug | ||
Write-Host "GOPATH: $env:GOPATH" | ||
# Get-ChildItem -Path $env:GOPATH\bin | ||
|
||
# run tests | ||
$Env:TEST_COVERAGE = $true | ||
.\gopath\mage unitTest | ||
Write-Host "--- Build" | ||
mage build | ||
|
||
Write-Host "--- Unit tests" | ||
$Env:TEST_COVERAGE = $true | ||
mage unitTest |