From ec258bf798cf1730ef1488dfd37fbc9fb5e99c93 Mon Sep 17 00:00:00 2001 From: Pulumi Bot Date: Sat, 7 Oct 2023 06:11:47 +0000 Subject: [PATCH] [internal] Update GitHub Actions workflow files --- .github/workflows/master.yml | 2 ++ .github/workflows/prerelease.yml | 2 ++ .github/workflows/release.yml | 2 ++ .github/workflows/run-acceptance-tests.yml | 2 ++ .github/workflows/upgrade-bridge.yml | 2 +- .github/workflows/upgrade-provider.yml | 2 +- Makefile | 11 ++++++++--- 7 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index cbe3597..d370f61 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -214,6 +214,8 @@ jobs: repo: pulumi/schema-tools - name: Build tfgen & provider binaries run: make provider + - name: Unit-test provider code + run: make test_provider - if: github.event_name == 'pull_request' name: Check Schema is Valid run: | diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 6394614..dee1a19 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -161,6 +161,8 @@ jobs: repo: pulumi/schema-tools - name: Build tfgen & provider binaries run: make provider + - name: Unit-test provider code + run: make test_provider - if: github.event_name == 'pull_request' name: Check Schema is Valid run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2d7fc9..a04b9b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -174,6 +174,8 @@ jobs: repo: pulumi/schema-tools - name: Build tfgen & provider binaries run: make provider + - name: Unit-test provider code + run: make test_provider - if: github.event_name == 'pull_request' name: Check Schema is Valid run: | diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 4de2b91..2c8006a 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -187,6 +187,8 @@ jobs: repo: pulumi/schema-tools - name: Build tfgen & provider binaries run: make provider + - name: Unit-test provider code + run: make test_provider - if: github.event_name == 'pull_request' name: Check Schema is Valid run: | diff --git a/.github/workflows/upgrade-bridge.yml b/.github/workflows/upgrade-bridge.yml index 446131f..75cea22 100644 --- a/.github/workflows/upgrade-bridge.yml +++ b/.github/workflows/upgrade-bridge.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Call upgrade provider action - uses: pulumi/pulumi-upgrade-provider-action@v0.0.6 + uses: pulumi/pulumi-upgrade-provider-action@v0.0.7 with: kind: bridge - env: diff --git a/.github/workflows/upgrade-provider.yml b/.github/workflows/upgrade-provider.yml index a820365..4e067ab 100644 --- a/.github/workflows/upgrade-provider.yml +++ b/.github/workflows/upgrade-provider.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Call upgrade provider action - uses: pulumi/pulumi-upgrade-provider-action@v0.0.6 + uses: pulumi/pulumi-upgrade-provider-action@v0.0.7 with: kind: all - env: diff --git a/Makefile b/Makefile index d84f20d..d94c065 100644 --- a/Makefile +++ b/Makefile @@ -106,6 +106,12 @@ provider: tfgen install_plugins test: cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h +test_provider: + @echo "" + @echo "== test_provider ===================================================================" + @echo "" + cd provider && go test -v -short ./... -parallel $(TESTPARALLELISM) + tfgen: install_plugins upstream (cd provider && go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o $(WORKING_DIR)/bin/$(TFGEN) -ldflags "-X $(PROJECT)/$(VERSION_PATH)=$(VERSION)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(TFGEN)) PATH=${PWD}/.pulumi/bin:$$PATH PULUMI_CONVERT=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER) @@ -138,13 +144,12 @@ ci-mgmt: .ci-mgmt.yaml --template bridged-provider \ --config $< -.pulumi/bin/pulumi: HOME := $(WORKING_DIR) .pulumi/bin/pulumi: .pulumi/version - curl -fsSL https://get.pulumi.com | sh -s -- --version $(cat .pulumi/version) + curl -fsSL https://get.pulumi.com | HOME=$(WORKING_DIR) sh -s -- --version $(cat .pulumi/version) # Compute the version of Pulumi to use by inspecting the Go dependencies of the provider. .pulumi/version: @mkdir -p .pulumi @cd provider && go list -f "{{slice .Version 1}}" -m github.com/pulumi/pulumi/pkg/v3 | tee ../$@ -.PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_dotnet build_go build_java build_nodejs build_python clean cleanup help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider test tfgen upstream upstream.finalize upstream.rebase ci-mgmt +.PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_dotnet build_go build_java build_nodejs build_python clean cleanup help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider test tfgen upstream upstream.finalize upstream.rebase ci-mgmt test_provider