Dan Anglin
5fd24b80df
* replace the table driven test with sub tests. * create and publish code coverage reports via GitLab pages. * use JUnit to view test results in the test tab in the pipeline view. * upgrade Go to version 1.13.6.
19 lines
351 B
Makefile
19 lines
351 B
Makefile
NAME := pominal
|
|
BIN_DIR := ./bin
|
|
BIN_FILE := $(BIN_DIR)/$(NAME)
|
|
|
|
.PHONY: all test_unit build clean
|
|
|
|
all: test_unit build
|
|
|
|
test_unit:
|
|
@go test -v -coverprofile=cover.out . 2>&1 | go-junit-report > report.xml
|
|
|
|
test_cover_report: test_unit
|
|
@go tool cover -html=cover.out -o code-coverage.html
|
|
|
|
build:
|
|
@go build -a -v -o $(BIN_FILE)
|
|
|
|
clean:
|
|
@go clean
|