[DRAFT] Add support for write only attributes #982
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Continuous integration handling for Go | |
name: ci-go | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/ci-go.yml | |
- .golangci.yml | |
- go.mod | |
- '**.go' | |
permissions: | |
contents: read | |
jobs: | |
golangci-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
go-version-file: 'go.mod' | |
- run: go mod download | |
- uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 | |
terraform-provider-corner-tfprotov5: | |
defaults: | |
run: | |
working-directory: terraform-provider-corner | |
name: terraform-provider-corner (tfprotov5 / Terraform ${{ matrix.terraform}}) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
path: terraform-provider-corner | |
repository: hashicorp/terraform-provider-corner | |
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
with: | |
terraform_version: ${{ matrix.terraform }} | |
terraform_wrapper: false | |
- run: go mod edit -replace=github.com/hashicorp/terraform-plugin-framework=../ | |
- run: go mod tidy | |
- run: go test -v ./internal/framework5provider | |
strategy: | |
fail-fast: false | |
matrix: | |
terraform: ${{ fromJSON(vars.TF_VERSIONS_PROTOCOL_V5) }} | |
terraform-provider-corner-tfprotov6: | |
defaults: | |
run: | |
working-directory: terraform-provider-corner | |
name: terraform-provider-corner (tfprotov6 / Terraform ${{ matrix.terraform}}) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
path: terraform-provider-corner | |
repository: hashicorp/terraform-provider-corner | |
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
with: | |
terraform_version: ${{ matrix.terraform }} | |
terraform_wrapper: false | |
- run: go mod edit -replace=github.com/hashicorp/terraform-plugin-framework=../ | |
- run: go mod tidy | |
- run: go test -v ./internal/framework6provider | |
strategy: | |
fail-fast: false | |
matrix: | |
terraform: ${{ fromJSON(vars.TF_VERSIONS_PROTOCOL_V6) }} | |
test: | |
name: test (Go v${{ matrix.go-version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: [ '1.23', '1.22' ] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- run: go mod download | |
- run: go test -coverprofile=coverage.out ./... | |
- run: go tool cover -html=coverage.out -o coverage.html | |
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: go-${{ matrix.go-version }}-coverage | |
path: coverage.html |