mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-02 19:39:56 -05:00
51 lines
1.0 KiB
YAML
51 lines
1.0 KiB
YAML
name: Test Go
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'go/**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
name: Go tests
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [macos-10.15, ubuntu-18.04, windows-latest]
|
|
steps:
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ^1.13
|
|
id: go
|
|
- uses: actions/checkout@v2
|
|
- name: Test All
|
|
working-directory: ./go
|
|
run: |
|
|
files=$(go list ./...)
|
|
|
|
SAVEIFS=$IFS
|
|
IFS=$'\n'
|
|
|
|
file_arr=($files)
|
|
|
|
IFS=$SAVEIFS
|
|
|
|
file_list=
|
|
for (( i=0; i<${#file_arr[@]}; i++ ))
|
|
do
|
|
echo "Testing Package: ${file_arr[$i]}"
|
|
go test -timeout 30m -race "${file_arr[$i]}"
|
|
succeeded=$(echo "$?")
|
|
if [ "$succeeded" -ne 0 ]; then
|
|
echo "Testing failed in package ${file_arr[$i]}"
|
|
exit 1;
|
|
fi
|
|
done
|