Skip to content

Update downstream dependencies and implement GenerateResourceConfig RPC #1070

Update downstream dependencies and implement GenerateResourceConfig RPC

Update downstream dependencies and implement GenerateResourceConfig RPC #1070

Workflow file for this run

# 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: 'go.mod'
- run: go mod download
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
test:
name: test (Go ${{ matrix.go-version }} / TF ${{ matrix.terraform }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [ '1.25', '1.26' ]
terraform: ${{ fromJSON(vars.TF_VERSIONS_PROTOCOL_V5) }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: ${{ matrix.go-version }}
- uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: go mod download
- run: go test -v -coverprofile=coverage.out ./...
env:
TF_ACC: "1"
- name: Remove wildcard suffix from TF version
id: tf_version
run: |
orginal_version="${{ matrix.terraform }}"
wildcard=".*"
echo "version=${orginal_version%"$wildcard"}" >> "$GITHUB_OUTPUT"
- run: go tool cover -html=coverage.out -o coverage.html
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: go-${{ matrix.go-version }}-terraform-${{ steps.tf_version.outputs.version }}-coverage
path: coverage.html