Skip to content

all: Bump minimum Go module version to 1.22 #173

all: Bump minimum Go module version to 1.22

all: Bump minimum Go module version to 1.22 #173

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-version
- go.mod
- '**.go'
permissions:
contents: read
jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
- run: go mod download
- uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
terraform-provider-corner:
defaults:
run:
working-directory: terraform-provider-corner
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: terraform-provider-corner
repository: hashicorp/terraform-provider-corner
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
- run: go mod edit -replace=github.com/hashicorp/terraform-plugin-mux=../
- run: go mod tidy
- run: go test -v ./...
env:
TF_ACC: '1'
test:
name: test (Go v${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.23', '1.22' ]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
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@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: go-${{ matrix.go-version }}-coverage
path: coverage.html