1
0
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:
Niko Köser 2021-01-31 14:56:06 +01:00
parent ad952a5282
commit c2e2e5e40d
No known key found for this signature in database
GPG Key ID: F3F28C118DAA6375
3 changed files with 60 additions and 0 deletions

15
.kodiak.toml Normal file
View 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
View 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

View File

@ -1,3 +1,6 @@
//go:generate go install github.com/golangci/golangci-lint/cmd/golangci-lint
//go:generate go install mvdan.cc/gofumpt/gofumports
//go:generate go install github.com/daixiang0/gci
package notify
import (