skip -race enginetests until merge (#3286)

* skip prepared tests when -race testing

* test.short

* missing env var

* skip race enginetests

* race on merge main

* put new format skip back

* simplify matrix

* aaron's comment
This commit is contained in:
Maximilian Hoffman
2022-04-23 09:21:49 -07:00
committed by GitHub
parent 82a6fc5d72
commit 122cf63553
4 changed files with 210 additions and 145 deletions
@@ -0,0 +1,34 @@
name: Test Go
on:
push:
branches: [ main ]
paths:
- 'go/**'
workflow_dispatch:
jobs:
enginerace:
name: Go tests - race enginetests
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-18.04 ]
dolt_fmt: [ "", "__DOLT_DEV__" ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.18
id: go
- uses: actions/checkout@v2
- name: Test All
working-directory: ./go
run: |
DOLT_SKIP_PREPARED_ENGINETESTS=1 go test -race -timeout 30m github.com/dolthub/dolt/go/libraries/doltcore/sqle/enginetest
env:
DOLT_DEFAULT_BIN_FORMAT: ${{ matrix.dolt_fmt }}
+6 -7
View File
@@ -32,23 +32,22 @@ jobs:
- name: Test All
working-directory: ./go
run: |
if [ -n "$DOLT_FMT" ]; then export DOLT_DEFAULT_BIN_FORMAT="$DOLT_FMT"; fi
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]}"
if [ "$MATRIX_OS" == 'ubuntu-18.04' ]
then
go test -timeout 45m -race "${file_arr[$i]}"
if [[ "${file_arr[$i]}" == *enginetest* ]]; then
go test -timeout 45m -race "${file_arr[$i]}"
else
echo "skipping enginetests for -race"
fi
else
go test -timeout 45m "${file_arr[$i]}"
fi
@@ -60,7 +59,7 @@ jobs:
done
env:
MATRIX_OS: ${{ matrix.os }}
DOLT_FMT: ${{ matrix.dolt_fmt }}
DOLT_DEFAULT_BIN_FORMAT: ${{ matrix.dolt_fmt }}
noracetest:
name: Go tests - no race
defaults: