Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
Update Makefile with integration test & cover
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewrankin committed Jan 19, 2024
1 parent a2d712c commit de1a09c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ help:
@echo "You can perform the following:"
@echo ""
@echo " check Format, vet, and unit test Go code"
@echo " cover Show test coverage in html"
@echo " lint Lint Go code using staticcheck"
@echo " cover Run & show test coverage in html"
@echo " int Run integration tests"
@echo " int-cover Run & show integration test coverage in html"
@echo " lint Lint Go code using staticcheck"

check:
@echo 'Formatting, vetting, and testing Go code'
Expand All @@ -17,10 +18,15 @@ lint:
staticcheck -f stylish ./...

cover:
@echo 'Test coverage in html'
go test -coverprofile=coverage.out
@echo 'Unit test coverage in html'
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out

int:
@echo 'Run integration tests'
go test ./... -tags=integration

int-cover:
@echo 'Integration test coverage in html'
go test -coverprofile=coverage.out -tags=integration
go tool cover -html=coverage.out

0 comments on commit de1a09c

Please sign in to comment.