/.github/workflows/ci-go-tests.yaml: only use race on ubuntu

This commit is contained in:
Dustin Brown
2021-04-19 13:38:36 -07:00
parent 8d2a167de8
commit b016989f76

View File

@@ -41,10 +41,17 @@ jobs:
for (( i=0; i<${#file_arr[@]}; i++ ))
do
echo "Testing Package: ${file_arr[$i]}"
go test -timeout 30m -race "${file_arr[$i]}"
if [ "$MATRIX_OS" == 'ubuntu-18.04' ]
then
go test -timeout 30m -race "${file_arr[$i]}"
else
go test -timeout 30m "${file_arr[$i]}"
fi
succeeded=$(echo "$?")
if [ "$succeeded" -ne 0 ]; then
echo "Testing failed in package ${file_arr[$i]}"
exit 1;
fi
done
env:
MATRIX_OS: ${{ matrix.os }}