diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 7252c7121c4..6033752f0d2 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -383,7 +383,11 @@ jobs: - name: go test run: | cd provider/shim - go test -v . + go test -v -coverprofile="coverage.txt" . + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} timeout-minutes: 60 name: run-acceptance-tests diff --git a/.gitignore b/.gitignore index 8b556af2292..75c54fe826a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ yarn.lock **/pulumiManifest.go ci-scripts +provider/shim/coverage.txt provider/**/schema-embed.json **/version.txt **/nuget diff --git a/Makefile b/Makefile index 9f2508fe35a..c7f997e613b 100644 --- a/Makefile +++ b/Makefile @@ -124,7 +124,7 @@ provider: tfgen install_plugins (cd provider && go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o $(WORKING_DIR)/bin/$(PROVIDER) -ldflags "-X $(PROJECT)/$(VERSION_PATH)=$(VERSION) -X github.com/hashicorp/terraform-provider-aws/version.ProviderVersion=$(VERSION)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(PROVIDER)) test: - cd provider/shim && go test -v . + cd provider/shim && go test -v -coverprofile="coverage.txt" . cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h test.upgrade:: diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000000..bfdc9877d9a --- /dev/null +++ b/codecov.yml @@ -0,0 +1,8 @@ +coverage: + status: + project: + default: + informational: true + patch: + default: + informational: true