mirror of
https://github.com/lingble/talos.git
synced 2025-12-24 16:37:08 +00:00
chore: use the toolchain for go builds (#317)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This commit is contained in:
@@ -5,21 +5,16 @@ set -e
|
||||
CGO_ENABLED=1
|
||||
GOPACKAGES=$(go list ./...)
|
||||
|
||||
lint_packages() {
|
||||
echo "Linting packages"
|
||||
golangci-lint run --config ${1}
|
||||
}
|
||||
|
||||
perform_unit_tests() {
|
||||
echo "Performing unit tests"
|
||||
go test -v -short ./...
|
||||
}
|
||||
|
||||
perform_integration_tests() {
|
||||
echo "Performing integration tests"
|
||||
perform_tests() {
|
||||
echo "Performing tests"
|
||||
go test -v ./...
|
||||
}
|
||||
|
||||
perform_short_tests() {
|
||||
echo "Performing short tests"
|
||||
go test -v -short ./...
|
||||
}
|
||||
|
||||
perform_coverage_tests() {
|
||||
echo "Performing coverage tests"
|
||||
local coverage_report="coverage.txt"
|
||||
@@ -38,20 +33,14 @@ perform_coverage_tests() {
|
||||
}
|
||||
|
||||
case $1 in
|
||||
--lint)
|
||||
lint_packages ${2}
|
||||
;;
|
||||
--unit)
|
||||
perform_unit_tests
|
||||
;;
|
||||
--integration)
|
||||
perform_integration_tests
|
||||
--short)
|
||||
perform_short_tests
|
||||
;;
|
||||
--coverage)
|
||||
perform_coverage_tests
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
perform_tests
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user