From 9ca24f9d24ea5aa49ceb1c0bd44d5c24fea057ac Mon Sep 17 00:00:00 2001 From: mikeee Date: Mon, 8 Feb 2021 00:40:34 +0000 Subject: [PATCH 1/3] Revert to get the latest version of Go Signed-off-by: mikeee --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e4d913200..bf54ec5ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,7 +60,7 @@ jobs: # Temporary workaround until circleci updates go. shell: bash command: | - choco install golang --version 1.15.7 + choco upgrade -y golang - run: shell: bash command: | From 52109966af550077e3471eb99d9925593f6fdd68 Mon Sep 17 00:00:00 2001 From: mikeee Date: Mon, 8 Feb 2021 00:44:58 +0000 Subject: [PATCH 2/3] Change the CI workflow to powershell and fixes the missing env var issue Signed-off-by: mikeee --- .circleci/config.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bf54ec5ba..026355ac8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,20 +52,25 @@ jobs: path: test-results test_windows: - executor: win/default + executor: + name: win/default + shell: powershell working_directory: /go/src/github.com/prometheus/prometheus steps: - checkout - run: # Temporary workaround until circleci updates go. - shell: bash command: | choco upgrade -y golang - run: - shell: bash + command: + refreshenv + - run: command: | - (cd web/ui && GOOS= GOARCH= go generate -mod=vendor) - go test -mod=vendor -vet=off -test.v `go list ./...|grep -Exv "(github.com/prometheus/prometheus/discovery.*|github.com/prometheus/prometheus/config|github.com/prometheus/prometheus/web)"` + $env:GOARCH=""; $env:GOOS=""; cd web/ui; go generate -mod=vendor + cd ../.. + $TestTargets = go list ./... | Where-Object { $_ -NotMatch "(github.com/prometheus/prometheus/discovery.*|github.com/prometheus/prometheus/config|github.com/prometheus/prometheus/web)"} + go test $TestTargets -mod=vendor -vet=off -v environment: GOGC: "20" GOOPTS: "-p 2 -mod=vendor"