Skip to content

Commit 3560eeb

Browse files
Fix#206 - Upgrade dependencies and Go to 1.22 (#207)
* Upgrade dependencies and Go to 1.22 Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com> * Fix GitHub Actions and upgrade dependencies Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com> * Fix Float32OrString validation methods Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com> * Move custom validator to retry_validator.go Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com> * Upgrade validator library Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com> --------- Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
1 parent 04614c3 commit 3560eeb

File tree

11 files changed

+216
-132
lines changed

11 files changed

+216
-132
lines changed

.github/workflows/Go-SDK-Check-k8s-integration.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ on:
2323
branches:
2424
- main
2525
env:
26-
GO_VERSION: 1.19
26+
GO_VERSION: 1.22
2727
jobs:
2828
basic_checks:
2929
name: Basic Checks
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Checkout Code
33-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
3434
- name: Setup Go ${{ env.GO_VERSION }}
35-
uses: actions/setup-go@v4
35+
uses: actions/setup-go@v5
3636
with:
3737
go-version: ${{ env.GO_VERSION }}
3838
id: go
3939
- name: Cache dependencies
40-
uses: actions/cache@v3
40+
uses: actions/cache@v4
4141
with:
4242
path: |
4343
~/.cache/go-build
@@ -46,7 +46,7 @@ jobs:
4646
restore-keys: |
4747
${{ runner.os }}-go-
4848
- name: Cache tools
49-
uses: actions/cache@v3
49+
uses: actions/cache@v4
5050
with:
5151
path: ~/go/bin
5252
key: ${{ runner.os }}-go-tools-${{ hashFiles('**/tools.sum') }}

.github/workflows/Go-SDK-PR-Check.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ on:
2323
branches:
2424
- main
2525
env:
26-
GO_VERSION: 1.19
26+
GO_VERSION: 1.22
2727
jobs:
2828
basic_checks:
2929
name: Basic Checks
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Checkout Code
33-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
3434
- name: Setup Go ${{ env.GO_VERSION }}
35-
uses: actions/setup-go@v4
35+
uses: actions/setup-go@v5
3636
with:
3737
go-version: ${{ env.GO_VERSION }}
3838
id: go
3939
- name: Cache dependencies
40-
uses: actions/cache@v3
40+
uses: actions/cache@v4
4141
with:
4242
path: |
4343
~/.cache/go-build
@@ -46,7 +46,7 @@ jobs:
4646
restore-keys: |
4747
${{ runner.os }}-go-
4848
- name: Cache tools
49-
uses: actions/cache@v3
49+
uses: actions/cache@v4
5050
with:
5151
path: ~/go/bin
5252
key: ${{ runner.os }}-go-tools-${{ hashFiles('**/tools.sum') }}
@@ -67,7 +67,7 @@ jobs:
6767
changed_files=$(git status -s | grep -v 'go.mod\|go.sum\|tools.mod\|tools.sum' || :)
6868
[[ -z "$changed_files" ]] || (printf "Some files are not formatted properly: \n$changed_files\n Did you run 'make test' before sending the PR?" && exit 1)
6969
- name: Check lint
70-
uses: golangci/golangci-lint-action@v3
70+
uses: golangci/golangci-lint-action@v6
7171
with:
7272
version: latest
7373
- name: Install cover
@@ -78,7 +78,7 @@ jobs:
7878
run: |
7979
go test ./... -coverprofile test_coverage.out -covermode=atomic
8080
- name: Upload results to codecov
81-
uses: codecov/codecov-action@v3
81+
uses: codecov/codecov-action@v4
8282
with:
8383
files: ./test_coverage.out
8484
flags: sdk-go

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ fmt:
66
@go vet ./...
77
@go fmt ./...
88

9+
goimports:
10+
@command -v goimports > /dev/null || go install golang.org/x/tools/cmd/goimports@latest
11+
@goimports -w .
12+
13+
914
lint:
1015
@command -v golangci-lint > /dev/null || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin"
1116
make addheaders
17+
make goimports
1218
make fmt
1319
./hack/go-lint.sh ${params}
1420

@@ -38,7 +44,7 @@ LOCALBIN ?= $(shell pwd)/bin
3844
$(LOCALBIN):
3945
mkdir -p $(LOCALBIN)
4046

41-
CONTROLLER_TOOLS_VERSION ?= v0.9.2
47+
CONTROLLER_TOOLS_VERSION ?= v0.16.3
4248
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
4349
.PHONY: controller-gen
4450
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.

go.mod

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,44 @@
11
module github.com/serverlessworkflow/sdk-go/v2
22

3-
go 1.19
3+
go 1.22.8
4+
5+
toolchain go1.23.1
46

57
require (
6-
github.com/go-playground/validator/v10 v10.11.1
8+
github.com/go-playground/validator/v10 v10.22.1
79
github.com/pkg/errors v0.9.1
8-
github.com/relvacode/iso8601 v1.3.0
9-
github.com/sosodev/duration v1.2.0
10-
github.com/stretchr/testify v1.8.0
10+
github.com/relvacode/iso8601 v1.4.0
11+
github.com/sosodev/duration v1.3.1
12+
github.com/stretchr/testify v1.9.0
1113
gopkg.in/yaml.v3 v3.0.1
12-
k8s.io/apimachinery v0.26.2
13-
sigs.k8s.io/controller-runtime v0.14.4
14-
sigs.k8s.io/yaml v1.3.0
14+
k8s.io/apimachinery v0.31.1
15+
sigs.k8s.io/controller-runtime v0.19.0
16+
sigs.k8s.io/yaml v1.4.0
1517
)
1618

1719
require (
18-
github.com/davecgh/go-spew v1.1.1 // indirect
19-
github.com/go-logr/logr v1.2.3 // indirect
20-
github.com/go-playground/locales v0.14.0 // indirect
21-
github.com/go-playground/universal-translator v0.18.0 // indirect
20+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
21+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
22+
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
23+
github.com/go-logr/logr v1.4.2 // indirect
24+
github.com/go-playground/locales v0.14.1 // indirect
25+
github.com/go-playground/universal-translator v0.18.1 // indirect
2226
github.com/gogo/protobuf v1.3.2 // indirect
2327
github.com/google/gofuzz v1.2.0 // indirect
2428
github.com/json-iterator/go v1.1.12 // indirect
25-
github.com/leodido/go-urn v1.2.1 // indirect
29+
github.com/leodido/go-urn v1.4.0 // indirect
2630
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
2731
github.com/modern-go/reflect2 v1.0.2 // indirect
28-
github.com/pmezard/go-difflib v1.0.0 // indirect
29-
golang.org/x/crypto v0.15.0 // indirect
30-
golang.org/x/net v0.18.0 // indirect
31-
golang.org/x/sys v0.14.0 // indirect
32-
golang.org/x/text v0.14.0 // indirect
32+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
33+
github.com/x448/float16 v0.8.4 // indirect
34+
golang.org/x/crypto v0.28.0 // indirect
35+
golang.org/x/net v0.26.0 // indirect
36+
golang.org/x/sys v0.26.0 // indirect
37+
golang.org/x/text v0.19.0 // indirect
3338
gopkg.in/inf.v0 v0.9.1 // indirect
3439
gopkg.in/yaml.v2 v2.4.0 // indirect
35-
k8s.io/klog/v2 v2.80.2-0.20221028030830-9ae4992afb54 // indirect
36-
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
37-
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
38-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
40+
k8s.io/klog/v2 v2.130.1 // indirect
41+
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
42+
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
43+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
3944
)
40-
41-
replace golang.org/x/text => golang.org/x/text v0.3.8

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy