mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 07:10:19 +00:00
NOISSUE - Update Go version
Signed-off-by: dusan <borovcanindusan1@gmail.com>
This commit is contained in:
@@ -25,9 +25,15 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24.x
|
||||
go-version: 1.25.x
|
||||
cache-dependency-path: "go.sum"
|
||||
|
||||
- name: Set GOBIN
|
||||
run: echo "GOBIN=$HOME/.local/bin" >> $GITHUB_ENV
|
||||
|
||||
- name: Add GOBIN to PATH
|
||||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
make test
|
||||
|
||||
@@ -20,9 +20,15 @@ jobs:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24.x
|
||||
go-version: 1.25.x
|
||||
cache-dependency-path: "go.sum"
|
||||
|
||||
- name: Set GOBIN
|
||||
run: echo "GOBIN=$HOME/.local/bin" >> $GITHUB_ENV
|
||||
|
||||
- name: Add GOBIN to PATH
|
||||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Fetch SuperMQ
|
||||
run: |
|
||||
make fetch_supermq
|
||||
@@ -41,7 +47,7 @@ jobs:
|
||||
- name: Run linters
|
||||
uses: golangci/golangci-lint-action@v8
|
||||
with:
|
||||
version: v2.1.6
|
||||
version: v2.4.0
|
||||
args: --config ./tools/config/.golangci.yaml
|
||||
|
||||
run-tests:
|
||||
@@ -58,7 +64,7 @@ jobs:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.25.x
|
||||
cache-dependency-path: "go.sum"
|
||||
|
||||
- name: Check for changes in specific paths
|
||||
|
||||
@@ -19,7 +19,8 @@ DOCKER_PROJECT ?= $(shell echo $(subst $(space),,$(USER_REPO)) | sed -E 's/[^a-z
|
||||
DOCKER_COMPOSE_COMMANDS_SUPPORTED := up down config
|
||||
DEFAULT_DOCKER_COMPOSE_COMMAND := up
|
||||
GRPC_MTLS_CERT_FILES_EXISTS = 0
|
||||
MOCKERY_VERSION=v3.5.0
|
||||
MOCKERY = $(GOBIN)/mockery
|
||||
MOCKERY_VERSION=3.5.3
|
||||
PKG_PROTO_GEN_OUT_DIR=api/grpc
|
||||
INTERNAL_PROTO_DIR=internal/proto
|
||||
INTERNAL_PROTO_FILES := $(shell find $(INTERNAL_PROTO_DIR) -name "*.proto" | sed 's|$(INTERNAL_PROTO_DIR)/||')
|
||||
@@ -115,10 +116,19 @@ install:
|
||||
cp $$file $(GOBIN)/magistrala-`basename $$file`; \
|
||||
done
|
||||
|
||||
mocks:
|
||||
@which mockery > /dev/null || go install github.com/vektra/mockery/v3@$(MOCKERY_VERSION)
|
||||
mockery --config ./tools/config/.mockery.yaml
|
||||
mocks: $(MOCKERY)
|
||||
@$(MOCKERY) --config ./tools/config/.mockery.yaml
|
||||
|
||||
$(MOCKERY):
|
||||
@mkdir -p $(GOBIN)
|
||||
@mkdir -p mockery
|
||||
@echo ">> downloading mockery $(MOCKERY_VERSION)..."
|
||||
@curl -sL https://github.com/vektra/mockery/releases/download/v$(MOCKERY_VERSION)/mockery_$(MOCKERY_VERSION)_Linux_x86_64.tar.gz | tar -xz -C mockery
|
||||
@mv mockery/mockery $(GOBIN)
|
||||
@rm -r mockery
|
||||
|
||||
mocks: $(MOCKERY)
|
||||
@$(MOCKERY) --config ./tools/config/.mockery.yaml
|
||||
|
||||
DIRS = consumers readers postgres internal
|
||||
test: mocks
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright (c) Abstract Machines
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FROM golang:1.24.5-alpine AS builder
|
||||
FROM golang:1.25.0-alpine AS builder
|
||||
ARG SVC
|
||||
ARG GOARCH
|
||||
ARG GOARM
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module github.com/absmach/magistrala
|
||||
|
||||
go 1.24.5
|
||||
go 1.25.0
|
||||
|
||||
require (
|
||||
github.com/0x6flab/namegenerator v1.4.0
|
||||
|
||||
@@ -5964,84 +5964,6 @@ func (_c *SDK_Hierarchy_Call) RunAndReturn(run func(ctx context.Context, id stri
|
||||
return _c
|
||||
}
|
||||
|
||||
// Invitation provides a mock function for the type SDK
|
||||
func (_mock *SDK) Invitation(ctx context.Context, userID string, domainID string, token string) (sdk0.Invitation, error) {
|
||||
ret := _mock.Called(ctx, userID, domainID, token)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Invitation")
|
||||
}
|
||||
|
||||
var r0 sdk0.Invitation
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) (sdk0.Invitation, error)); ok {
|
||||
return returnFunc(ctx, userID, domainID, token)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) sdk0.Invitation); ok {
|
||||
r0 = returnFunc(ctx, userID, domainID, token)
|
||||
} else {
|
||||
r0 = ret.Get(0).(sdk0.Invitation)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
|
||||
r1 = returnFunc(ctx, userID, domainID, token)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SDK_Invitation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Invitation'
|
||||
type SDK_Invitation_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// Invitation is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - userID string
|
||||
// - domainID string
|
||||
// - token string
|
||||
func (_e *SDK_Expecter) Invitation(ctx interface{}, userID interface{}, domainID interface{}, token interface{}) *SDK_Invitation_Call {
|
||||
return &SDK_Invitation_Call{Call: _e.mock.On("Invitation", ctx, userID, domainID, token)}
|
||||
}
|
||||
|
||||
func (_c *SDK_Invitation_Call) Run(run func(ctx context.Context, userID string, domainID string, token string)) *SDK_Invitation_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 string
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(string)
|
||||
}
|
||||
var arg2 string
|
||||
if args[2] != nil {
|
||||
arg2 = args[2].(string)
|
||||
}
|
||||
var arg3 string
|
||||
if args[3] != nil {
|
||||
arg3 = args[3].(string)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
arg3,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *SDK_Invitation_Call) Return(invitation sdk0.Invitation, err error) *SDK_Invitation_Call {
|
||||
_c.Call.Return(invitation, err)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *SDK_Invitation_Call) RunAndReturn(run func(ctx context.Context, userID string, domainID string, token string) (sdk0.Invitation, error)) *SDK_Invitation_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// Invitations provides a mock function for the type SDK
|
||||
func (_mock *SDK) Invitations(ctx context.Context, pm sdk0.PageMetadata, token string) (sdk0.InvitationPage, error) {
|
||||
ret := _mock.Called(ctx, pm, token)
|
||||
|
||||
Reference in New Issue
Block a user