Skip to content

Commit 901dda2

Browse files
committed
github-ci: add test for msgpack.v5
Closes #124
1 parent 1204fc8 commit 901dda2

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

.github/workflows/testing.yml

+10
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ jobs:
6060
- name: Run tests
6161
run: make test
6262

63+
- name: Run tests with msgpack.v5
64+
run: make test TAGS="go_tarantool_msgpack_v5"
65+
6366
- name: Run tests, collect code coverage data and send to Coveralls
6467
if: ${{ matrix.coveralls }}
6568
env:
@@ -134,6 +137,13 @@ jobs:
134137
env:
135138
TEST_TNT_SSL: ${{matrix.ssl}}
136139

140+
- name: Run tests with msgpack.v5
141+
run: |
142+
source tarantool-enterprise/env.sh
143+
make test TAGS="go_tarantool_msgpack_v5"
144+
env:
145+
TEST_TNT_SSL: ${{matrix.ssl}}
146+
137147
- name: Run tests, collect code coverage data and send to Coveralls
138148
if: ${{ matrix.coveralls }}
139149
env:

CONTRIBUTING.md

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ make test
2929
The tests set up all required `tarantool` processes before run and clean up
3030
afterwards.
3131

32+
If you want to run the tests with specific build tags:
33+
```bash
34+
make test TAGS=go_tarantool_ssl_disable,go_tarantool_msgpack_v5
35+
```
36+
3237
If you have Tarantool Enterprise Edition 2.10 or newer, you can run additional
3338
SSL tests. To do this, you need to set an environment variable 'TEST_TNT_SSL':
3439

Makefile

+10-9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ BENCH_REFERENCE_REPO := ${BENCH_PATH}/go-tarantool
1313
BENCH_OPTIONS := -bench=. -run=^Benchmark -benchmem -benchtime=${DURATION} -count=${COUNT}
1414
GO_TARANTOOL_URL := https://github.com/tarantool/go-tarantool
1515
GO_TARANTOOL_DIR := ${PROJECT_DIR}/${BENCH_PATH}/go-tarantool
16+
TAGS :=
1617

1718
.PHONY: clean
1819
clean:
@@ -33,7 +34,7 @@ golangci-lint:
3334

3435
.PHONY: test
3536
test:
36-
go test ./... -v -p 1
37+
go test -tags "$(TAGS)" ./... -v -p 1
3738

3839
.PHONY: testdata
3940
testdata:
@@ -43,38 +44,38 @@ testdata:
4344
test-connection-pool:
4445
@echo "Running tests in connection_pool package"
4546
go clean -testcache
46-
go test ./connection_pool/ -v -p 1
47+
go test -tags "$(TAGS)" ./connection_pool/ -v -p 1
4748

4849
.PHONY: test-multi
4950
test-multi:
5051
@echo "Running tests in multiconnection package"
5152
go clean -testcache
52-
go test ./multi/ -v -p 1
53+
go test -tags "$(TAGS)" ./multi/ -v -p 1
5354

5455
.PHONY: test-queue
5556
test-queue:
5657
@echo "Running tests in queue package"
5758
cd ./queue/ && tarantool -e "require('queue')"
5859
go clean -testcache
59-
go test ./queue/ -v -p 1
60+
go test -tags "$(TAGS)" ./queue/ -v -p 1
6061

6162
.PHONY: test-uuid
6263
test-uuid:
6364
@echo "Running tests in UUID package"
6465
go clean -testcache
65-
go test ./uuid/ -v -p 1
66+
go test -tags "$(TAGS)" ./uuid/ -v -p 1
6667

6768
.PHONY: test-main
6869
test-main:
6970
@echo "Running tests in main package"
7071
go clean -testcache
71-
go test . -v -p 1
72+
go test -tags "$(TAGS)" . -v -p 1
7273

7374
.PHONY: coverage
7475
coverage:
7576
go clean -testcache
7677
go get golang.org/x/tools/cmd/cover
77-
go test ./... -v -p 1 -covermode=atomic -coverprofile=$(COVERAGE_FILE) -coverpkg=./...
78+
go test -tags "$(TAGS)" ./... -v -p 1 -covermode=atomic -coverprofile=$(COVERAGE_FILE) -coverpkg=./...
7879
go tool cover -func=$(COVERAGE_FILE)
7980

8081
.PHONY: coveralls
@@ -94,7 +95,7 @@ ${BENCH_PATH} bench-deps:
9495
.PHONY: bench
9596
${BENCH_FILE} bench: ${BENCH_PATH}
9697
@echo "Running benchmark tests from the current branch"
97-
go test ${TEST_PATH} ${BENCH_OPTIONS} 2>&1 \
98+
go test -tags "$(TAGS)" ${TEST_PATH} ${BENCH_OPTIONS} 2>&1 \
9899
| tee ${BENCH_FILE}
99100
benchstat ${BENCH_FILE}
100101

@@ -104,7 +105,7 @@ ${GO_TARANTOOL_DIR}:
104105

105106
${REFERENCE_FILE}: ${GO_TARANTOOL_DIR}
106107
@echo "Running benchmark tests from master for using results in bench-diff target"
107-
cd ${GO_TARANTOOL_DIR} && git pull && go test ./... ${BENCH_OPTIONS} 2>&1 \
108+
cd ${GO_TARANTOOL_DIR} && git pull && go test -tags $(TAGS) ./... ${BENCH_OPTIONS} 2>&1 \
108109
| tee ${REFERENCE_FILE}
109110

110111
bench-diff: ${BENCH_FILES}

0 commit comments

Comments
 (0)