File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1111
1212# Go workspace file
1313go.work
14- go.work.sum
14+ go.work.sum
15+
16+ # Test coverage reports
17+ coverage.out
18+ coverage.html
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ These commands can be executed from the project root:
3131- ` make lint ` : lint the code
3232- ` make generate-docs ` : generate Markdown documentation for every command
3333- ` make test ` : run unit tests
34+ - ` make coverage ` : create unit test coverage report (output file: ` coverage.html ` )
3435
3536### Repository structure
3637
Original file line number Diff line number Diff line change 3333 @echo " >> Running tests for the CLI application"
3434 @go test ./... -count=1
3535
36+ # Test coverage
37+ coverage :
38+ @echo " >> Creating test coverage report for the CLI application"
39+ @go test ./... -coverprofile=coverage.out || true
40+ @go tool cover -html=coverage.out -o coverage.html
41+
3642# Generate docs
3743generate-docs :
3844 @echo " >> Generating docs..."
You can’t perform that action at this time.
0 commit comments