Skip to content

Commit

Permalink
adding make coverage now that fortio/workflows#51 is done
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Jun 30, 2024
1 parent a3ee518 commit 34330f1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
.golangci.yml
fullsize
smallsize
coverage.out
coverage?.out
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch test function with tags",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}",
"buildFlags": "-tags=no_json"
}

]
}
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ test:
go test -tags no_json ./...
go test -tags no_http ./...

coverage:
go test -coverprofile=coverage1.out ./...
go test -tags no_net -coverprofile=coverage2.out ./...
go test -tags no_json -coverprofile=coverage3.out ./...
go test -tags no_http,no_json -coverprofile=coverage4.out ./...
gocovmerge coverage?.out > coverage.out
# go tool cover -html=coverage.out

example:
@echo "### Colorized (default) ###"
go run ./levelsDemo
Expand Down

0 comments on commit 34330f1

Please sign in to comment.