pominal/Makefile
Dan Anglin e4df5bfb8e
ci: run junit report from branches
JUnit reports are useful for merge requests
so it is generate only from commits to branches
other than master.

This solves the issue where the code coverage was missing
from the badge and no testing logs are shown in the console
output.

Also fixed (hopefully) is the deployment of the coverage
report to my GitLab pages site.
2020-01-18 01:48:27 +00:00

22 lines
386 B
Makefile

NAME := pominal
BIN_DIR := ./bin
BIN_FILE := $(BIN_DIR)/$(NAME)
.PHONY: all test_unit build clean
all: test_unit build
test_junit_report:
@go test -v . 2>&1 | go-junit-report > report.xml
test_unit:
@go test -v -coverprofile=cover.out .
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