From 75452bf383564aab97aa416f8def26d9c92e7828 Mon Sep 17 00:00:00 2001 From: Pulumi Bot Date: Mon, 16 Mar 2026 13:05:16 +0000 Subject: [PATCH] [internal] Update GitHub Actions workflow files --- .config/mise.test.toml | 3 ++- .github/workflows/test.yml | 8 ++++---- Makefile | 8 +++++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.config/mise.test.toml b/.config/mise.test.toml index 7176fabf..a97f5ffa 100644 --- a/.config/mise.test.toml +++ b/.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/.github/workflows/test.yml b/.github/workflows/test.yml index 36953271..c4542c6c 100644 --- a/.github/workflows/test.yml +++ b/.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 }}/.. @@ -98,8 +99,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: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} MIST_API_TOKEN: ${{ steps.esc-secrets.outputs.MIST_API_TOKEN}} @@ -109,7 +109,7 @@ jobs: MIST_ORG_ID: ${{ steps.esc-secrets.outputs.MIST_ORG_ID}} - 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 }} MIST_API_TOKEN: ${{ steps.esc-secrets.outputs.MIST_API_TOKEN}} @@ -119,7 +119,7 @@ jobs: MIST_ORG_ID: ${{ steps.esc-secrets.outputs.MIST_ORG_ID}} - 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 }} MIST_API_TOKEN: ${{ steps.esc-secrets.outputs.MIST_API_TOKEN}} diff --git a/Makefile b/Makefile index cfc70f84..2fbb8d25 100644 --- a/Makefile +++ b/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,13 +254,13 @@ 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) \ - ./... + . test_provider: $(call test_provider_cmd) .PHONY: test_provider