Skip to content

Commit

Permalink
chore: migrate to go1.22 (#2540)
Browse files Browse the repository at this point in the history
* chore: migrate to go1.22

* add toolchain

* Fix tfproviderlint and make it part of the tools
  • Loading branch information
remyleone authored Apr 18, 2024
1 parent 49f87e1 commit 01de721
Show file tree
Hide file tree
Showing 13 changed files with 115 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/acceptance-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22
- name: Checkout
uses: actions/checkout@v4
- name: Run Acceptance Tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fetch-depth: 2
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
- name: Run coverage
run: go test -v -timeout=2h -coverprofile=coverage.out -covermode=count ./...
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- docs/**

env:
GO_VERSION: "1.21"
GO_VERSION: "1.22"
GO111MODULE: on

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22
- name: Checkout
uses: actions/checkout@v4
- name: Run Acceptance Tests
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22
- name: Checkout
uses: actions/checkout@v4
- name: Run sweepers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22
-
name: Import GPG key
id: import_gpg
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tfproviderlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22
- name: Install tfproviderlint
run: go install github.com/bflad/tfproviderlint/cmd/tfproviderlint@latest
run: go install github.com/bflad/tfproviderlint/cmd/tfproviderlint
- name: Run tfproviderlint
run: tfproviderlint -R014=false -AT001.ignored-filename-suffixes=_data_source_test.go ./...
run: make tfproviderlint
tfproviderdocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22
- uses: hashicorp/setup-terraform@v3
- run: go install github.com/bflad/tfproviderdocs@latest
- run: tfproviderdocs check -provider-name scaleway -enable-contents-check
- run: make tfproviderdocs
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
tests:
strategy:
matrix:
go-version: [1.21.x]
go-version: [1.22.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.21
1.22
5 changes: 5 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,8 @@ website:

.PHONY: build test testacc vet fmt fmtcheck errcheck test-compile website

tfproviderlint:
go run github.com/bflad/tfproviderlint/cmd/tfproviderlint -R014=false -AT001.ignored-filename-suffixes=_data_source_test.go ./...

tfproviderdocs:
go run github.com/bflad/tfproviderdocs check -provider-name scaleway -enable-contents-check
2 changes: 1 addition & 1 deletion cmd/tftemplate/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module tftemplate

go 1.21
go 1.22

require github.com/AlecAivazis/survey/v2 v2.3.7

Expand Down
26 changes: 23 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
module github.com/scaleway/terraform-provider-scaleway/v2

go 1.22

toolchain go1.22.2

require (
github.com/aws/aws-sdk-go v1.51.19
github.com/bflad/tfproviderdocs v0.12.0
github.com/bflad/tfproviderlint v0.29.0
github.com/docker/docker v26.0.0+incompatible
github.com/dustin/go-humanize v1.0.1
github.com/google/go-cmp v0.6.0
Expand All @@ -24,10 +30,17 @@ require (
)

require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/bflad/gopaniccheck v0.1.0 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bmatcuk/doublestar v1.3.4 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -40,6 +53,7 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
Expand All @@ -55,11 +69,14 @@ require (
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/cli v1.1.5 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
Expand All @@ -75,10 +92,15 @@ require (
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.14.2 // indirect
github.com/yuin/goldmark v1.5.4 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.14.3 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 // indirect
Expand All @@ -99,5 +121,3 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.0.3 // indirect
)

go 1.21
Loading

0 comments on commit 01de721

Please sign in to comment.