Last active
November 17, 2022 02:23
-
-
Save aamironline/5470000ca61542a522ba5a9cff69b811 to your computer and use it in GitHub Desktop.
Runs tests and generate coverage report for your Go projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script is used to generate test coverage reports for the | |
# go project. It is intended to be run from the root of the project | |
# directory. | |
echo "Running tests and generating coverage report..." | |
go test -coverprofile=coverage.out | |
echo "Opening coverage report..." | |
go tool cover -html=coverage.out | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment