From 9871d61fc7317b56c3e3f6c615b6573d5893a996 Mon Sep 17 00:00:00 2001 From: Stefan Bogdanovic Date: Fri, 12 Jan 2024 11:38:08 +0100 Subject: [PATCH] Github Actions fixed Signed-off-by: Stefan Bogdanovic --- .github/workflows/test.yml | 2 +- Makefile | 29 ----------------------------- Taskfile.yml | 6 ++++++ main.go | 10 ++++++++++ 4 files changed, 17 insertions(+), 30 deletions(-) delete mode 100644 Makefile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fcee1e4..a655dc7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - go: [1.19] + go: [1.21] runs-on: ${{ matrix.os }} container: golang:${{ matrix.go }}-bullseye steps: diff --git a/Makefile b/Makefile deleted file mode 100644 index abcffdc..0000000 --- a/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -RACE ?= 0 - -.PHONY: test -test: -ifeq ($(RACE), 1) - @CC=gcc CXX=g++ go test ./... -race -covermode=atomic -coverprofile=coverage.txt -timeout 5m -else - @CC=gcc CXX=g++ go test ./... -covermode=atomic -coverprofile=coverage.txt -timeout 1m -endif - -.PHONY: tidy -tidy: - @rm -f go.sum - @go mod tidy - -.PHONY: clean -clean: - @rm -rf ./bin - -.PHONY: lint -lint: - @golangci-lint run - -.PHONY: fmt -fmt: - @gofumpt -l -w . - -gosec: - @gosec ./... diff --git a/Taskfile.yml b/Taskfile.yml index d0fc500..67f8b7e 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -26,3 +26,9 @@ tasks: cmds: - rm -f go.sum - go mod tidy + +# ifeq ($(RACE), 1) +# @CC=gcc CXX=g++ go test ./... -race -covermode=atomic -coverprofile=coverage.txt -timeout 5m +# else +# @CC=gcc CXX=g++ go test ./... -covermode=atomic -coverprofile=coverage.txt -timeout 1m +# endif \ No newline at end of file diff --git a/main.go b/main.go index 09bf38a..5c13e86 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,16 @@ package main import "fmt" +type Action struct { + Key string + Value any + Type string +} + +type RedisMock struct { + data []Action +} + func main() { fmt.Println("Start Here...") }