Reviewed-on: #1 Co-authored-by: jake <jake.young.dev@gmail.com> Co-committed-by: jake <jake.young.dev@gmail.com>
28 lines
609 B
Bash
Executable File
28 lines
609 B
Bash
Executable File
#!/bin/bash
|
|
if [[ "$LIBRARY" == "none" ]]; then
|
|
echo "Test flag not set, skipping unit tests."
|
|
exit 0
|
|
fi
|
|
|
|
if [[ "$LIBRARY" == "standard" ]]; then
|
|
echo "Running unit tests with standard library"
|
|
if go test ./...; then
|
|
echo "Tests passed!"
|
|
exit 0
|
|
else
|
|
echo "Tests failed!"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
if [[ "$LIBRARY" == "ginkgo" ]]; then
|
|
echo "Running unit tests with ginkgo"
|
|
go install github.com/onsi/ginkgo/v2/ginkgo@v2.23.4
|
|
if ginkgo ./...; then
|
|
echo "Tests passed!"
|
|
exit 0
|
|
else
|
|
echo "Tests failed!"
|
|
exit 1
|
|
fi
|
|
fi |