Skip to content

CoverageTracker/example-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

example-go

coverage badge complexity badge

A small, idiomatic Go order-pricing library used as the Go reference example for Coverage Tracker. It exists to give the Go row in the coverage report generation guide a live, working reference, and to populate the demo dashboard with real trend data.

This is a demo/marketing repo, not a test suite for Coverage Tracker itself. Go's native coverage profile doesn't carry branch data, so unlike the other example repos this one won't show a branch coverage metric on the dashboard.

What's here

  • inventory/ — shipping cost, volume discount, and SKU validation logic for a small mail-order warehouse, each with real branching logic.
  • cmd/example-go/ — a thin CLI entry point that prices a sample order using the inventory package.
  • .github/workflows/coverage.yml — runs go test with a coverage profile, generates a gocyclo complexity report, then reports both to the demo instance via the coverage-tracker reporting Action.

Running locally

go test -coverprofile=coverage.out ./...   # writes coverage.out
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
gocyclo -avg -ignore '_test\.go' .

About

Go demo project reporting test coverage and cyclomatic complexity to CoverageTracker via the reporting Action.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages