Lamassu is an IoT first PKI designed for industrial scenarios. This is the main code repository for Lamassu IoT where the product logic is being implemented. If you are looking for deployment instructions, please check the docs or the project's Docker Compose repository.
Each service has its own set of unit tests. To run them, you can use the following commands:
Note: In order to speed up the process, the tests are run in parallel by default.
START=$(date +%s)
go run gotest.tools/gotestsum@latest --format github-actions ./pkg/... -coverpkg=./... -timeout 600s -coverprofile cover.out
END=$(date +%s)
DIFF=$(( $END - $START ))
echo "It took $DIFF seconds"
go tool cover -func cover.out | grep total | awk '{print substr($3, 1, length($3)-1)}' | .github/coverage-badge.sh
go tool cover -html=cover.out -o cover-report.html
go-cover-treemap -coverprofile cover.out > out.svg
go test -json -v -coverprofile cover.out -coverpkg=./... ./pkg/v3/...
go tool cover -func=cover.out
CGO_ENABLED=1 GOARCH=arm64 go build -ldflags "-X main.sha1ver=git rev-parse HEAD
-X main.buildTime=$now" -o ca cmd/ca/main.go