
Installing
Go
Make sure you have Go 1.18.+ installed:
brew install go
Dependencies
# install dependencies via makefile script
make deps
# set $GOPATH env variable (should be your home directory)
export GOPATH=${HOME}/go
# download dependency
go mod vendor
# build
make
# test to ensure everything is working
make test
Testing
Coverage report plugin
# run coverage uploader plugin (using "project" as an example)
TEST_COVERAGE_DATABASE_URL="postgres://postgres:postgres@localhost:5432" \
go run serve.go test.coverage \
--manifest=project/manifest.yml \
--coverage-file=test.exec \
--coverage-tolerance=1.0 \
--repo=my-repo \
--branch=main \
--ref=abc123 \
--test-type=unit
-- view binary data (postgres)
SELECT encode(coverage_file::bytea, 'escape')
FROM public.coverage_reports
ORDER BY id ASC