diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 80a3d63..af61f25 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -215,6 +215,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 d15b5ff..f5261f5 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -162,6 +162,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 34071d4..b26be76 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -175,6 +175,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 5c31f8b..0f323bf 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -188,6 +188,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/.upgrade-config.yml b/.upgrade-config.yml index a643a87..7399880 100644 --- a/.upgrade-config.yml +++ b/.upgrade-config.yml @@ -6,3 +6,4 @@ pulumi-infer-version: true remove-plugins: true pr-reviewers: pulumi/Providers,lukehoban +javaVersion: "v0.5.4" diff --git a/Makefile b/Makefile index 8d94d64..7964376 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