diff --git a/provider-ci/internal/pkg/templates/all/.config/mise.test.toml b/provider-ci/internal/pkg/templates/all/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/internal/pkg/templates/all/.config/mise.test.toml +++ b/provider-ci/internal/pkg/templates/all/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/internal/pkg/templates/base/.github/workflows/test.yml b/provider-ci/internal/pkg/templates/base/.github/workflows/test.yml index 4c7310af1d..f50c57b251 100644 --- a/provider-ci/internal/pkg/templates/base/.github/workflows/test.yml +++ b/provider-ci/internal/pkg/templates/base/.github/workflows/test.yml @@ -13,6 +13,7 @@ on: env: PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} MISE_ENV: test + GO_TEST_EXEC: "gotestsum --format github-actions --" #{{ .Config | renderGlobalEnv | indent 2 }}# @@ -171,19 +172,18 @@ jobs: #{{- if .Config.IntegrationTestProvider }}# - name: Run provider tests if: matrix.testTarget == 'local' - working-directory: provider - run: go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . + run: make TESTTAGS=${{ matrix.language }} GOTESTARGS="-count=1 -cover" test_provider env: #{{ .Config | renderLocalEnv | indent 8 }}# #{{- end }}# - name: Run tests if: matrix.testTarget == 'local' - run: cd #{{ .Config.TestFolder }}# && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 . + run: make TESTTAGS=${{ matrix.language }} GOTESTARGS="-count=1 -cover -skip TestPulumiExamples" test env: #{{ .Config | renderLocalEnv | indent 8 }}# - name: Run pulumi/examples tests if: matrix.testTarget == 'pulumiExamples' - run: cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -run TestPulumiExamples -parallel 4 . + run: make TESTTAGS=${{ matrix.language }} GOTESTARGS="-count=1 -cover -run TestPulumiExamples" test env: #{{ .Config | renderLocalEnv | indent 8 }}# #{{- else }}# diff --git a/provider-ci/internal/pkg/templates/base/Makefile b/provider-ci/internal/pkg/templates/base/Makefile index 3e4cd744a8..94a8fb494c 100644 --- a/provider-ci/internal/pkg/templates/base/Makefile +++ b/provider-ci/internal/pkg/templates/base/Makefile @@ -13,6 +13,8 @@ CODEGEN := pulumi-#{{ .Config.GenName }}#-$(PACK) PROVIDER := pulumi-resource-$(PACK) TESTPARALLELISM := 10 GOTESTARGS := "" +TESTTAGS ?= all +GO_TEST_EXEC ?= go test WORKING_DIR := $(shell pwd) #{{- if .Config.GoBuildParallelism }}# PULUMI_PROVIDER_BUILD_PARALLELISM ?= -p #{{ .Config.GoBuildParallelism }}# @@ -341,13 +343,13 @@ bin/$(PROVIDER): .make/schema test: export PATH := $(WORKING_DIR)/bin:$(PATH) test: - cd #{{ .Config.TestFolder }}# && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) + cd #{{ .Config.TestFolder }}# && $(GO_TEST_EXEC) -v -tags=$(TESTTAGS) -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) .PHONY: test #{{- if .Config.TestProviderCmd }}# test_provider_cmd = #{{ .Config.TestProviderCmd }}# #{{- else }}# -test_provider_cmd = cd provider && go test -v -short \ +test_provider_cmd = cd provider && $(GO_TEST_EXEC) -v -short \ -coverprofile="coverage.txt" \ -coverpkg="./...,github.com/hashicorp/terraform-provider-..." \ -parallel $(TESTPARALLELISM) \ diff --git a/provider-ci/internal/pkg/templates/parameterized-go/Makefile b/provider-ci/internal/pkg/templates/parameterized-go/Makefile index 3321900bfd..fb9e32c9ae 100644 --- a/provider-ci/internal/pkg/templates/parameterized-go/Makefile +++ b/provider-ci/internal/pkg/templates/parameterized-go/Makefile @@ -11,6 +11,8 @@ GO_MODULE := $(PROJECT) PROVIDER := pulumi-resource-$(PACK) TESTPARALLELISM := 10 GOTESTARGS := "" +TESTTAGS ?= all +GO_TEST_EXEC ?= go test WORKING_DIR := $(shell pwd) #{{- if .Config.GoBuildParallelism }}# PULUMI_PROVIDER_BUILD_PARALLELISM ?= -p #{{ .Config.GoBuildParallelism }}# @@ -125,13 +127,13 @@ bin/$(PROVIDER): $(call build_provider_cmd,$(shell go env GOOS),$(shell go env GOARCH),$(WORKING_DIR)/bin/$(PROVIDER)) test: - cd #{{ .Config.TestFolder }}# && go test -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) + cd #{{ .Config.TestFolder }}# && $(GO_TEST_EXEC) -tags=$(TESTTAGS) -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) .PHONY: test #{{- if .Config.TestProviderCmd }}# test_provider_cmd = #{{ .Config.TestProviderCmd }}# #{{- else }}# -test_provider_cmd = go test \ +test_provider_cmd = $(GO_TEST_EXEC) \ -coverprofile="coverage.txt" \ -coverpkg="./..." \ -parallel $(TESTPARALLELISM) \ diff --git a/provider-ci/test-providers/aws-native/.config/mise.test.toml b/provider-ci/test-providers/aws-native/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/aws-native/.config/mise.test.toml +++ b/provider-ci/test-providers/aws-native/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/aws/.config/mise.test.toml b/provider-ci/test-providers/aws/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/aws/.config/mise.test.toml +++ b/provider-ci/test-providers/aws/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/aws/.github/workflows/test.yml b/provider-ci/test-providers/aws/.github/workflows/test.yml index fa6167841b..6b4ee37686 100644 --- a/provider-ci/test-providers/aws/.github/workflows/test.yml +++ b/provider-ci/test-providers/aws/.github/workflows/test.yml @@ -13,6 +13,7 @@ on: env: PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} MISE_ENV: test + GO_TEST_EXEC: "gotestsum --format github-actions --" AWS_REGION: us-west-2 PULUMI_API: https://api.pulumi-staging.io diff --git a/provider-ci/test-providers/aws/Makefile b/provider-ci/test-providers/aws/Makefile index a8fa05cec0..4eb7342e96 100644 --- a/provider-ci/test-providers/aws/Makefile +++ b/provider-ci/test-providers/aws/Makefile @@ -9,6 +9,8 @@ CODEGEN := pulumi-tfgen-$(PACK) PROVIDER := pulumi-resource-$(PACK) TESTPARALLELISM := 10 GOTESTARGS := "" +TESTTAGS ?= all +GO_TEST_EXEC ?= go test WORKING_DIR := $(shell pwd) PULUMI_PROVIDER_BUILD_PARALLELISM ?= -p 2 PULUMI_CONVERT := 1 @@ -245,9 +247,9 @@ bin/$(PROVIDER): .make/schema test: export PATH := $(WORKING_DIR)/bin:$(PATH) test: - cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) + cd examples && $(GO_TEST_EXEC) -v -tags=$(TESTTAGS) -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) .PHONY: test -test_provider_cmd = cd provider && go test -v -short \ +test_provider_cmd = cd provider && $(GO_TEST_EXEC) -v -short \ -coverprofile="coverage.txt" \ -coverpkg="./...,github.com/hashicorp/terraform-provider-..." \ -parallel $(TESTPARALLELISM) \ diff --git a/provider-ci/test-providers/cloudflare/.config/mise.test.toml b/provider-ci/test-providers/cloudflare/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/cloudflare/.config/mise.test.toml +++ b/provider-ci/test-providers/cloudflare/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/cloudflare/.github/workflows/test.yml b/provider-ci/test-providers/cloudflare/.github/workflows/test.yml index b4401303d3..93c2e9140f 100644 --- a/provider-ci/test-providers/cloudflare/.github/workflows/test.yml +++ b/provider-ci/test-providers/cloudflare/.github/workflows/test.yml @@ -13,6 +13,7 @@ on: env: PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} MISE_ENV: test + GO_TEST_EXEC: "gotestsum --format github-actions --" PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. @@ -105,8 +106,7 @@ jobs: run: make install_${{ matrix.language}}_sdk - name: Run provider tests if: matrix.testTarget == 'local' - working-directory: provider - run: go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . + run: make TESTTAGS=${{ matrix.language }} GOTESTARGS="-count=1 -cover" test_provider env: CLOUDFLARE_ACCOUNT_ID: ${{ steps.esc-secrets.outputs.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ steps.esc-secrets.outputs.CLOUDFLARE_API_TOKEN }} @@ -114,7 +114,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run tests if: matrix.testTarget == 'local' - run: cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 . + run: make TESTTAGS=${{ matrix.language }} GOTESTARGS="-count=1 -cover -skip TestPulumiExamples" test env: CLOUDFLARE_ACCOUNT_ID: ${{ steps.esc-secrets.outputs.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ steps.esc-secrets.outputs.CLOUDFLARE_API_TOKEN }} @@ -122,7 +122,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run pulumi/examples tests if: matrix.testTarget == 'pulumiExamples' - run: cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -run TestPulumiExamples -parallel 4 . + run: make TESTTAGS=${{ matrix.language }} GOTESTARGS="-count=1 -cover -run TestPulumiExamples" test env: CLOUDFLARE_ACCOUNT_ID: ${{ steps.esc-secrets.outputs.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ steps.esc-secrets.outputs.CLOUDFLARE_API_TOKEN }} diff --git a/provider-ci/test-providers/cloudflare/Makefile b/provider-ci/test-providers/cloudflare/Makefile index 5761e3af8b..25648d66c2 100644 --- a/provider-ci/test-providers/cloudflare/Makefile +++ b/provider-ci/test-providers/cloudflare/Makefile @@ -9,6 +9,8 @@ CODEGEN := pulumi-tfgen-$(PACK) PROVIDER := pulumi-resource-$(PACK) TESTPARALLELISM := 10 GOTESTARGS := "" +TESTTAGS ?= all +GO_TEST_EXEC ?= go test WORKING_DIR := $(shell pwd) PULUMI_PROVIDER_BUILD_PARALLELISM ?= PULUMI_CONVERT := 1 @@ -252,9 +254,9 @@ bin/$(PROVIDER): .make/schema test: export PATH := $(WORKING_DIR)/bin:$(PATH) test: - cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) + cd examples && $(GO_TEST_EXEC) -v -tags=$(TESTTAGS) -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) .PHONY: test -test_provider_cmd = cd provider && go test -v -short \ +test_provider_cmd = cd provider && $(GO_TEST_EXEC) -v -short \ -coverprofile="coverage.txt" \ -coverpkg="./...,github.com/hashicorp/terraform-provider-..." \ -parallel $(TESTPARALLELISM) \ diff --git a/provider-ci/test-providers/command/.config/mise.test.toml b/provider-ci/test-providers/command/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/command/.config/mise.test.toml +++ b/provider-ci/test-providers/command/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/docker-build/.config/mise.test.toml b/provider-ci/test-providers/docker-build/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/docker-build/.config/mise.test.toml +++ b/provider-ci/test-providers/docker-build/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/docker/.config/mise.test.toml b/provider-ci/test-providers/docker/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/docker/.config/mise.test.toml +++ b/provider-ci/test-providers/docker/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/docker/.github/workflows/test.yml b/provider-ci/test-providers/docker/.github/workflows/test.yml index c8b9968a6a..8cfbe445c7 100644 --- a/provider-ci/test-providers/docker/.github/workflows/test.yml +++ b/provider-ci/test-providers/docker/.github/workflows/test.yml @@ -13,6 +13,7 @@ on: env: PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} MISE_ENV: test + GO_TEST_EXEC: "gotestsum --format github-actions --" ARM_CLIENT_ID: 30e520fa-12b4-4e21-b473-9426c5ac2e1e ARM_SUBSCRIPTION_ID: 0282681f-7a9e-424b-80b2-96babd57a8a1 @@ -137,7 +138,7 @@ jobs: run: make install_${{ matrix.language}}_sdk - name: Run tests if: matrix.testTarget == 'local' - run: cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 . + run: make TESTTAGS=${{ matrix.language }} GOTESTARGS="-count=1 -cover -skip TestPulumiExamples" test env: ARM_CLIENT_SECRET: ${{ steps.esc-secrets.outputs.ARM_CLIENT_SECRET }} DIGITALOCEAN_TOKEN: ${{ steps.esc-secrets.outputs.DIGITALOCEAN_TOKEN }} @@ -146,7 +147,7 @@ jobs: PRIVATE_SSH_KEY_FOR_DIGITALOCEAN: ${{ steps.esc-secrets.outputs.PRIVATE_SSH_KEY_FOR_DIGITALOCEAN }} - name: Run pulumi/examples tests if: matrix.testTarget == 'pulumiExamples' - run: cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -run TestPulumiExamples -parallel 4 . + run: make TESTTAGS=${{ matrix.language }} GOTESTARGS="-count=1 -cover -run TestPulumiExamples" test env: ARM_CLIENT_SECRET: ${{ steps.esc-secrets.outputs.ARM_CLIENT_SECRET }} DIGITALOCEAN_TOKEN: ${{ steps.esc-secrets.outputs.DIGITALOCEAN_TOKEN }} diff --git a/provider-ci/test-providers/docker/Makefile b/provider-ci/test-providers/docker/Makefile index f49cdca149..edb1dcfba8 100644 --- a/provider-ci/test-providers/docker/Makefile +++ b/provider-ci/test-providers/docker/Makefile @@ -9,6 +9,8 @@ CODEGEN := pulumi-tfgen-$(PACK) PROVIDER := pulumi-resource-$(PACK) TESTPARALLELISM := 10 GOTESTARGS := "" +TESTTAGS ?= all +GO_TEST_EXEC ?= go test WORKING_DIR := $(shell pwd) PULUMI_PROVIDER_BUILD_PARALLELISM ?= PULUMI_CONVERT := 1 @@ -257,9 +259,9 @@ bin/$(PROVIDER): .make/schema test: export PATH := $(WORKING_DIR)/bin:$(PATH) test: - cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) + cd examples && $(GO_TEST_EXEC) -v -tags=$(TESTTAGS) -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) .PHONY: test -test_provider_cmd = cd provider && go test -v -short \ +test_provider_cmd = cd provider && $(GO_TEST_EXEC) -v -short \ -coverprofile="coverage.txt" \ -coverpkg="./...,github.com/hashicorp/terraform-provider-..." \ -parallel $(TESTPARALLELISM) \ diff --git a/provider-ci/test-providers/eks/.config/mise.test.toml b/provider-ci/test-providers/eks/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/eks/.config/mise.test.toml +++ b/provider-ci/test-providers/eks/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/eks/.github/workflows/test.yml b/provider-ci/test-providers/eks/.github/workflows/test.yml index d853c2cc86..67cb91f96a 100644 --- a/provider-ci/test-providers/eks/.github/workflows/test.yml +++ b/provider-ci/test-providers/eks/.github/workflows/test.yml @@ -13,6 +13,7 @@ on: env: PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} MISE_ENV: test + GO_TEST_EXEC: "gotestsum --format github-actions --" AWS_REGION: us-west-2 DOTNET_VERSION: 6.x diff --git a/provider-ci/test-providers/eks/Makefile b/provider-ci/test-providers/eks/Makefile index b8db51da10..decb4dbb07 100644 --- a/provider-ci/test-providers/eks/Makefile +++ b/provider-ci/test-providers/eks/Makefile @@ -9,6 +9,8 @@ CODEGEN := pulumi-gen-$(PACK) PROVIDER := pulumi-resource-$(PACK) TESTPARALLELISM := 10 GOTESTARGS := "" +TESTTAGS ?= all +GO_TEST_EXEC ?= go test WORKING_DIR := $(shell pwd) PULUMI_PROVIDER_BUILD_PARALLELISM ?= PULUMI_CONVERT := 0 @@ -246,9 +248,9 @@ bin/$(PROVIDER): .make/schema test: export PATH := $(WORKING_DIR)/bin:$(PATH) test: - cd tests && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) + cd tests && $(GO_TEST_EXEC) -v -tags=$(TESTTAGS) -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) .PHONY: test -test_provider_cmd = cd provider && go test -v -short \ +test_provider_cmd = cd provider && $(GO_TEST_EXEC) -v -short \ -coverprofile="coverage.txt" \ -coverpkg="./...,github.com/hashicorp/terraform-provider-..." \ -parallel $(TESTPARALLELISM) \ diff --git a/provider-ci/test-providers/kubernetes-cert-manager/.config/mise.test.toml b/provider-ci/test-providers/kubernetes-cert-manager/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/kubernetes-cert-manager/.config/mise.test.toml +++ b/provider-ci/test-providers/kubernetes-cert-manager/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/kubernetes-coredns/.config/mise.test.toml b/provider-ci/test-providers/kubernetes-coredns/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/kubernetes-coredns/.config/mise.test.toml +++ b/provider-ci/test-providers/kubernetes-coredns/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/kubernetes-ingress-nginx/.config/mise.test.toml b/provider-ci/test-providers/kubernetes-ingress-nginx/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/kubernetes-ingress-nginx/.config/mise.test.toml +++ b/provider-ci/test-providers/kubernetes-ingress-nginx/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/kubernetes/.config/mise.test.toml b/provider-ci/test-providers/kubernetes/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/kubernetes/.config/mise.test.toml +++ b/provider-ci/test-providers/kubernetes/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/pulumi-provider-boilerplate/.config/mise.test.toml b/provider-ci/test-providers/pulumi-provider-boilerplate/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/pulumi-provider-boilerplate/.config/mise.test.toml +++ b/provider-ci/test-providers/pulumi-provider-boilerplate/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/pulumiservice/.config/mise.test.toml b/provider-ci/test-providers/pulumiservice/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/pulumiservice/.config/mise.test.toml +++ b/provider-ci/test-providers/pulumiservice/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/pulumiservice/.github/workflows/test.yml b/provider-ci/test-providers/pulumiservice/.github/workflows/test.yml index c7894de6b0..4364840767 100644 --- a/provider-ci/test-providers/pulumiservice/.github/workflows/test.yml +++ b/provider-ci/test-providers/pulumiservice/.github/workflows/test.yml @@ -13,6 +13,7 @@ on: env: PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} MISE_ENV: test + GO_TEST_EXEC: "gotestsum --format github-actions --" PROVIDER: pulumiservice PULUMI_API: https://api.pulumi-staging.io diff --git a/provider-ci/test-providers/pulumiservice/Makefile b/provider-ci/test-providers/pulumiservice/Makefile index 7bdf46feb1..086d1f320c 100644 --- a/provider-ci/test-providers/pulumiservice/Makefile +++ b/provider-ci/test-providers/pulumiservice/Makefile @@ -9,6 +9,8 @@ CODEGEN := pulumi-gen-$(PACK) PROVIDER := pulumi-resource-$(PACK) TESTPARALLELISM := 10 GOTESTARGS := "" +TESTTAGS ?= all +GO_TEST_EXEC ?= go test WORKING_DIR := $(shell pwd) PULUMI_PROVIDER_BUILD_PARALLELISM ?= PULUMI_CONVERT := 0 @@ -245,9 +247,9 @@ bin/$(PROVIDER): test: export PATH := $(WORKING_DIR)/bin:$(PATH) test: - cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) + cd examples && $(GO_TEST_EXEC) -v -tags=$(TESTTAGS) -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) .PHONY: test -test_provider_cmd = cd provider && go test -v -short \ +test_provider_cmd = cd provider && $(GO_TEST_EXEC) -v -short \ -coverprofile="coverage.txt" \ -coverpkg="./...,github.com/hashicorp/terraform-provider-..." \ -parallel $(TESTPARALLELISM) \ diff --git a/provider-ci/test-providers/terraform-module/.config/mise.test.toml b/provider-ci/test-providers/terraform-module/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/terraform-module/.config/mise.test.toml +++ b/provider-ci/test-providers/terraform-module/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/terraform-module/.github/workflows/test.yml b/provider-ci/test-providers/terraform-module/.github/workflows/test.yml index c94cf23335..85bf843c42 100644 --- a/provider-ci/test-providers/terraform-module/.github/workflows/test.yml +++ b/provider-ci/test-providers/terraform-module/.github/workflows/test.yml @@ -13,6 +13,7 @@ on: env: PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} MISE_ENV: test + GO_TEST_EXEC: "gotestsum --format github-actions --" AWS_REGION: us-west-2 PULUMI_API: https://api.pulumi-staging.io diff --git a/provider-ci/test-providers/terraform-module/Makefile b/provider-ci/test-providers/terraform-module/Makefile index 75fc6820fa..c3ddc111be 100644 --- a/provider-ci/test-providers/terraform-module/Makefile +++ b/provider-ci/test-providers/terraform-module/Makefile @@ -7,6 +7,8 @@ GO_MODULE := $(PROJECT) PROVIDER := pulumi-resource-$(PACK) TESTPARALLELISM := 10 GOTESTARGS := "" +TESTTAGS ?= all +GO_TEST_EXEC ?= go test WORKING_DIR := $(shell pwd) PULUMI_PROVIDER_BUILD_PARALLELISM ?= @@ -106,9 +108,9 @@ bin/$(PROVIDER): $(call build_provider_cmd,$(shell go env GOOS),$(shell go env GOARCH),$(WORKING_DIR)/bin/$(PROVIDER)) test: - cd tests && go test -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) + cd tests && $(GO_TEST_EXEC) -tags=$(TESTTAGS) -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) .PHONY: test -test_provider_cmd = go test \ +test_provider_cmd = $(GO_TEST_EXEC) \ -coverprofile="coverage.txt" \ -coverpkg="./..." \ -parallel $(TESTPARALLELISM) \ diff --git a/provider-ci/test-providers/xyz/.config/mise.test.toml b/provider-ci/test-providers/xyz/.config/mise.test.toml index 7176fabfb3..a97f5ffaf2 100644 --- a/provider-ci/test-providers/xyz/.config/mise.test.toml +++ b/provider-ci/test-providers/xyz/.config/mise.test.toml @@ -1,3 +1,4 @@ # WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt -# Overrides for test workflows -- currently empty. +[tools] +"aqua:gotestyourself/gotestsum" = "1.12.0" diff --git a/provider-ci/test-providers/xyz/.github/workflows/test.yml b/provider-ci/test-providers/xyz/.github/workflows/test.yml index 605a96fcff..594de0f06d 100644 --- a/provider-ci/test-providers/xyz/.github/workflows/test.yml +++ b/provider-ci/test-providers/xyz/.github/workflows/test.yml @@ -13,6 +13,7 @@ on: env: PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} MISE_ENV: test + GO_TEST_EXEC: "gotestsum --format github-actions --" PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. @@ -100,12 +101,12 @@ jobs: run: make install_${{ matrix.language}}_sdk - name: Run tests if: matrix.testTarget == 'local' - run: cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 . + run: make TESTTAGS=${{ matrix.language }} GOTESTARGS="-count=1 -cover -skip TestPulumiExamples" test env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run pulumi/examples tests if: matrix.testTarget == 'pulumiExamples' - run: cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -run TestPulumiExamples -parallel 4 . + run: make TESTTAGS=${{ matrix.language }} GOTESTARGS="-count=1 -cover -run TestPulumiExamples" test env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} strategy: diff --git a/provider-ci/test-providers/xyz/Makefile b/provider-ci/test-providers/xyz/Makefile index 2ff741b4d3..4df6b56747 100644 --- a/provider-ci/test-providers/xyz/Makefile +++ b/provider-ci/test-providers/xyz/Makefile @@ -9,6 +9,8 @@ CODEGEN := pulumi-tfgen-$(PACK) PROVIDER := pulumi-resource-$(PACK) TESTPARALLELISM := 10 GOTESTARGS := "" +TESTTAGS ?= all +GO_TEST_EXEC ?= go test WORKING_DIR := $(shell pwd) PULUMI_PROVIDER_BUILD_PARALLELISM ?= -p 2 PULUMI_CONVERT := 1 @@ -245,9 +247,9 @@ bin/$(PROVIDER): .make/schema test: export PATH := $(WORKING_DIR)/bin:$(PATH) test: - cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) + cd examples && $(GO_TEST_EXEC) -v -tags=$(TESTTAGS) -parallel $(TESTPARALLELISM) -timeout 2h $(value GOTESTARGS) .PHONY: test -test_provider_cmd = cd provider && go test -v -short \ +test_provider_cmd = cd provider && $(GO_TEST_EXEC) -v -short \ -coverprofile="coverage.txt" \ -coverpkg="./...,github.com/hashicorp/terraform-provider-..." \ -parallel $(TESTPARALLELISM) \