Skip to content

Commit

Permalink
Add Makefile targets for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Apr 26, 2021
1 parent e0775b2 commit dfd8145
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/bin/golangci-lint
/chezmoi
/chezmoi.exe
/coverage.out
/dist
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ test:
$(GO) test -ldflags="-X github.com/twpayne/chezmoi/internal/chezmoitest.umaskStr=0o022" ./...
$(GO) test -ldflags="-X github.com/twpayne/chezmoi/internal/chezmoitest.umaskStr=0o002" ./...

.PHONY: coverage-html
coverage-html: coverage
$(GO) tool cover -html=coverage.out

.PHONY: coverage
coverage:
$(GO) test -test.coverprofile=coverage.out ./...

.PHONY: generate
generate: completions assets/scripts/install.sh

Expand Down

0 comments on commit dfd8145

Please sign in to comment.