Add the test-with-coverage makefile target. (#2017)

Signed-off-by: Ioannis Polyzos <git@ipolyzos.com>
Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>
Co-authored-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>
This commit is contained in:
Ioannis Polyzos 2024-09-27 15:07:23 +03:00 committed by GitHub
parent ffeb707b44
commit 4b0a3966cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,16 @@ export PATH := $(abspath bin/):${PATH}
# Dependency versions
LICENSEI_VERSION = 0.9.0
# run Go tests and generate a coverage report
#
# NOTE:
# The coverage counters are to be updated atomically,
# which is useful for tests that run in parallel.
.PHONY: test-with-coverage
test-with-coverage:
go test -coverprofile=coverage.out -covermode=atomic ./...
go tool cover -html=coverage.out -o coverage.html
# run the unit tests across all packages in the tofu project
.PHONY: test
test: