File tree 2 files changed +32
-4
lines changed
2 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 35
35
with :
36
36
files : coverage.txt
37
37
token : ${{ secrets.CODECOV_TOKEN }}
38
+
39
+ benchmark :
40
+ name : benchmark
41
+ runs-on : ubuntu-latest
42
+ strategy :
43
+ fail-fast : false
44
+ matrix :
45
+ go-version : [1.21.x, 1.23.x]
46
+
47
+ steps :
48
+ - name : Set up ${{ matrix.go-version }}
49
+ uses : actions/setup-go@v5
50
+ with :
51
+ go-version : ${{ matrix.go-version }}
52
+
53
+ - name : Checkout code
54
+ uses : actions/checkout@v4
55
+
56
+ - name : Benchmark Tests
57
+ run : make bench
58
+
38
59
39
60
test-redis-ce :
40
61
name : test-redis-ce
Original file line number Diff line number Diff line change 1
1
GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
2
2
export REDIS_MAJOR_VERSION := 7
3
3
4
- test : testdeps
4
+ redisstackdocker.start :
5
5
docker start go-redis-redis-stack || docker run -d --name go-redis-redis-stack -p 6379:6379 -e REDIS_ARGS=" --enable-debug-command yes --enable-module-command yes" redis/redis-stack-server:latest
6
+
7
+ redisstackdocker.stop :
8
+ docker stop go-redis-redis-stack
9
+
10
+ test : testdeps
11
+ $(MAKE ) redisstackdocker.start
6
12
$(eval GO_VERSION := $(shell go version | cut -d " " -f 3 | cut -d. -f2) )
7
13
set -e; for dir in $( GO_MOD_DIRS) ; do \
8
14
if echo " $$ {dir}" | grep -q " ./example" && [ " $( GO_VERSION) " = " 19" ]; then \
@@ -14,19 +20,20 @@ test: testdeps
14
20
go mod tidy -compat=1.18 && \
15
21
go test && \
16
22
go test ./... -short -race && \
17
- go test ./... -run=NONE -bench=. -benchmem && \
18
23
env GOOS=linux GOARCH=386 go test && \
19
24
go test -coverprofile=coverage.txt -covermode=atomic ./... && \
20
25
go vet); \
21
26
done
22
27
cd internal/customvet && go build .
23
28
go vet -vettool ./internal/customvet/customvet
24
- docker stop go-redis-redis-stack
29
+ $( MAKE ) redisstackdocker. stop
25
30
26
31
testdeps : testdata/redis/src/redis-server
27
32
28
- bench : testdeps
33
+ bench :
34
+ $(MAKE ) redisstackdocker.start
29
35
go test ./... -test.run=NONE -test.bench=. -test.benchmem
36
+ $(MAKE ) redisstackdocker.stop
30
37
31
38
.PHONY : all test testdeps bench fmt
32
39
You can’t perform that action at this time.
0 commit comments