Skip to content

Commit

Permalink
chore(layout): regenerate project layout with craft
Browse files Browse the repository at this point in the history
  • Loading branch information
kilianpaquier committed Feb 26, 2024
1 parent d3d6fc2 commit 30651ef
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .craft
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ ci: github
maintainers:
- url: kilianpaquier.com
name: kilianpaquier
codecov: true
no_api: true
no_chart: true
no_sonar: true
1 change: 1 addition & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
- run: CGO_ENABLED="0" go test ./... -coverpkg=./... -covermode=count -coverprofile=coverage.out
- uses: codecov/codecov-action@v4
with:
codecov_yml_path: codecov.yml
disable_search: true
fail_ci_if_error: true
file: coverage.out
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ issues:
# - EXC0015 # should have a package comment
exclude:
- G303 # file creation in shared tmp directory without using os.CreateTemp
- ST1003 # already covered by revive var-naming linter (package naming constraints)
exclude-rules:
# disable funlen for all _test.go files
- path: _test.go
Expand Down
26 changes: 3 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Code generated by craft; DO NOT EDIT.
# This file is safe to edit. Once it exists it will not be overwritten.

CI_PROJECT_PATH := github.com/kilianpaquier/pooling
GCI_CONFIG_PATH := .golangci.yml
include ./scripts/*.mk

.PHONY: generate
generate:
Expand All @@ -10,23 +9,4 @@ generate:
.PHONY: clean
clean:
@go clean
@git clean -Xf ./*

.PHONY: lint
lint:
@gci write --skip-generated -s standard -s default -s "Prefix(${CI_PROJECT_PATH})" .
@golangci-lint run -c ${GCI_CONFIG_PATH} --timeout 120s --fast --sort-results \
--issues-exit-code 0 \
--out-format colored-line-number $(ARGS)

.PHONY: test
test: lint
@go test ./... -count 1

.PHONY: test-race
test-race: lint
@go test ./... -race

.PHONY: test-cover
test-cover: lint
@go test ./... -coverpkg=./... -covermode=count -coverprofile=coverage.out
@git clean -Xf ./*
7 changes: 7 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Code generated by craft; DO NOT EDIT.

ignore:
- "cmd"
- "**/cobra"
- "**/tests"
- "**/testutils"
23 changes: 23 additions & 0 deletions scripts/build.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Code generated by craft; DO NOT EDIT.

CI_PROJECT_PATH := github.com/kilianpaquier/pooling
GCI_CONFIG_PATH := .golangci.yml

.PHONY: lint
lint:
@gci write --skip-generated -s standard -s default -s "Prefix(${CI_PROJECT_PATH})" .
@golangci-lint run -c ${GCI_CONFIG_PATH} --timeout 120s --fast --sort-results \
--issues-exit-code 0 \
--out-format colored-line-number $(ARGS)

.PHONY: test
test: lint
@go test ./... -count 1

.PHONY: test-race
test-race: lint
@go test ./... -race

.PHONY: test-cover
test-cover: lint
@go test ./... -coverpkg=./... -covermode=count -coverprofile=coverage.out

0 comments on commit 30651ef

Please sign in to comment.