Skip to content

Commit

Permalink
github-ci: add test for msgpack.v5
Browse files Browse the repository at this point in the history
Closes #124
  • Loading branch information
oleg-jukovec committed May 27, 2022
1 parent a83e5db commit f130468
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:
- name: Run tests
run: make test

- name: Run tests with msgpack.v5
run: make test TAGS="go_tarantool_msgpack_v5"

- name: Run tests, collect code coverage data and send to Coveralls
if: ${{ matrix.coveralls }}
env:
Expand Down
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BENCH_REFERENCE_REPO := ${BENCH_PATH}/go-tarantool
BENCH_OPTIONS := -bench=. -run=^Benchmark -benchmem -benchtime=${DURATION} -count=${COUNT}
GO_TARANTOOL_URL := https://github.com/tarantool/go-tarantool
GO_TARANTOOL_DIR := ${PROJECT_DIR}/${BENCH_PATH}/go-tarantool
TAGS :=

.PHONY: clean
clean:
Expand All @@ -25,44 +26,44 @@ deps: clean

.PHONY: test
test:
go test ./... -v -p 1
go test -tags "$(TAGS)" ./... -v -p 1

.PHONY: test-connection-pool
test-connection-pool:
@echo "Running tests in connection_pool package"
go clean -testcache
go test ./connection_pool/ -v -p 1
go test -tags "$(TAGS)" ./connection_pool/ -v -p 1

.PHONY: test-multi
test-multi:
@echo "Running tests in multiconnection package"
go clean -testcache
go test ./multi/ -v -p 1
go test -tags "$(TAGS)" ./multi/ -v -p 1

.PHONY: test-queue
test-queue:
@echo "Running tests in queue package"
cd ./queue/ && tarantool -e "require('queue')"
go clean -testcache
go test ./queue/ -v -p 1
go test -tags "$(TAGS)" ./queue/ -v -p 1

.PHONY: test-uuid
test-uuid:
@echo "Running tests in UUID package"
go clean -testcache
go test ./uuid/ -v -p 1
go test -tags "$(TAGS)" ./uuid/ -v -p 1

.PHONY: test-main
test-main:
@echo "Running tests in main package"
go clean -testcache
go test . -v -p 1
go test -tags "$(TAGS)" . -v -p 1

.PHONY: coverage
coverage:
go clean -testcache
go get golang.org/x/tools/cmd/cover
go test ./... -v -p 1 -covermode=atomic -coverprofile=$(COVERAGE_FILE) -coverpkg=./...
go test -tags "$(TAGS)" ./... -v -p 1 -covermode=atomic -coverprofile=$(COVERAGE_FILE) -coverpkg=./...
go tool cover -func=$(COVERAGE_FILE)

.PHONY: coveralls
Expand All @@ -82,7 +83,7 @@ ${BENCH_PATH} bench-deps:
.PHONY: bench
${BENCH_FILE} bench: ${BENCH_PATH}
@echo "Running benchmark tests from the current branch"
go test ${TEST_PATH} ${BENCH_OPTIONS} 2>&1 \
go test -tags "$(TAGS)" ${TEST_PATH} ${BENCH_OPTIONS} 2>&1 \
| tee ${BENCH_FILE}
benchstat ${BENCH_FILE}

Expand All @@ -92,7 +93,7 @@ ${GO_TARANTOOL_DIR}:

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

bench-diff: ${BENCH_FILES}
Expand Down

0 comments on commit f130468

Please sign in to comment.