diff --git a/.github/dependabot.yml b/.github/dependabot.yml index af374dd..61140ad 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,3 +6,8 @@ updates: directory: "/" schedule: interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fed8088..9fa86eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,7 +49,7 @@ jobs: - uses: hashicorp/setup-terraform@v3 with: terraform_wrapper: false - - run: go generate ./... + - run: make generate - name: git diff run: | git diff --compact-summary --exit-code || \ diff --git a/GNUmakefile b/GNUmakefile index 7771cd6..0301ab8 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,25 @@ -default: testacc +default: fmt lint install generate + +build: + go build -v ./... + +install: + go install -v ./... + +lint: + golangci-lint run + +generate: + cd tools; go generate ./... + +fmt: + gofmt -s -w -e . + +test: + go test -v -cover -timeout 120s -parallel=10 ./... # Run acceptance tests -.PHONY: testacc testacc: TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m + +PHONY: fmt lint test testacc build install generate diff --git a/main.go b/main.go index 534be4e..035f40e 100644 --- a/main.go +++ b/main.go @@ -12,16 +12,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/providerserver" ) -// Run "go generate" to format example terraform files and generate the docs for the registry/website - -// If you do not have terraform installed, you can remove the formatting command, but its suggested to -// ensure the documentation is formatted properly. -//go:generate terraform fmt -recursive ./examples/ - -// Run the docs generation tool, check its repository for more information on how it works and how docs -// can be customized. -//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs - var ( // these will be set by the goreleaser configuration // to appropriate values for the compiled binary. diff --git a/tools/tools.go b/tools/tools.go index 867d3a2..c6c989a 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -//go:build tools +//go:build generate package tools