Skip to content

Commit

Permalink
feat: add makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
justlorain committed Sep 20, 2023
1 parent 3b15cdf commit 837ea3f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
GO := go

SRC_FILES := $(wildcard *.go)
TEST_FILES := $(wildcard *_test.go)
COVERAGE_FILE := coverage.out

TEST_CMD := $(GO) test -v ./...

COVERAGE_CMD := $(GO) test -coverprofile=$(COVERAGE_FILE) ./...

BENCHMARK_CMD := $(GO) test -bench=. ./...

default: test

test:
@$(TEST_CMD)

coverage:
@$(COVERAGE_CMD)
@$(GO) tool cover -html=$(COVERAGE_FILE)

benchmark:
@$(BENCHMARK_CMD)

.PHONY: test coverage benchmark

0 comments on commit 837ea3f

Please sign in to comment.