Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .config/mise.test.toml
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}/..
Expand Down Expand Up @@ -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}}
Expand All @@ -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}}
Expand All @@ -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}}
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading