mirror of
https://github.com/nikoksr/notify.git
synced 2025-01-03 22:52:23 +02:00
build(make): Add make file and go-generate directives
This commit is contained in:
parent
ad952a5282
commit
c2e2e5e40d
15
.kodiak.toml
Normal file
15
.kodiak.toml
Normal file
@ -0,0 +1,15 @@
|
||||
version = 1
|
||||
|
||||
[merge]
|
||||
automerge_label = "automerge"
|
||||
blacklist_title_regex = "^WIP.*"
|
||||
method = "merge"
|
||||
delete_branch_on_merge = true
|
||||
block_on_reviews_requested = false
|
||||
notify_on_conflict = true
|
||||
optimistic_updates = true
|
||||
|
||||
[merge.message]
|
||||
title = "pull_request_title"
|
||||
include_pr_number = true
|
||||
body_type = "markdown"
|
42
Makefile
Normal file
42
Makefile
Normal file
@ -0,0 +1,42 @@
|
||||
export GO111MODULE := on
|
||||
export GOPROXY = https://proxy.golang.org,direct
|
||||
|
||||
###############################################################################
|
||||
# DEPENDENCIES
|
||||
###############################################################################
|
||||
|
||||
# Install all the build and lint dependencies
|
||||
setup:
|
||||
go mod download
|
||||
go generate -v ./...
|
||||
go mod tidy
|
||||
.PHONY: setup
|
||||
|
||||
###############################################################################
|
||||
# TESTS
|
||||
###############################################################################
|
||||
|
||||
# Run all the tests
|
||||
test:
|
||||
go test -failfast -race -timeout=5m ./...
|
||||
.PHONY: test
|
||||
|
||||
###############################################################################
|
||||
# CODE HEALTH
|
||||
###############################################################################
|
||||
|
||||
# gofumports and gci all go files
|
||||
fmt:
|
||||
find . -name '*.go' -not -wholename './vendor/*' | while read -r file; do gofumports -w "$$file"; done
|
||||
gci -w -local github.com/nikoksr/notify .
|
||||
.PHONY: fmt
|
||||
|
||||
# Run all the linters
|
||||
lint:
|
||||
golangci-lint run ./...
|
||||
.PHONY: lint
|
||||
|
||||
ci: test lint
|
||||
.PHONY: ci
|
||||
|
||||
.DEFAULT_GOAL := ci
|
Loading…
Reference in New Issue
Block a user