Skip to content

Commit

Permalink
ci: add coverage check (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucix-aws authored Dec 13, 2023
1 parent fa639ee commit 4909204
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ build/
# VS Code
bin/
.vscode/

# make
c.out
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,18 @@ smithy-clean:
##################
# Linting/Verify #
##################
.PHONY: verify vet
.PHONY: verify vet cover

verify: vet

vet:
go vet ${BUILD_TAGS} --all ./...

cover:
go test ${BUILD_TAGS} -coverprofile c.out ./...
@cover=`go tool cover -func c.out | grep '^total:' | awk '{ print $$3+0 }'`; \
echo "total (statements): $$cover%";

################
# Unit Testing #
################
Expand Down

0 comments on commit 4909204

Please sign in to comment.