Skip to content

feat(#249): T-SQL / SQL Server syntax support (Phase 3) #701

feat(#249): T-SQL / SQL Server syntax support (Phase 3)

feat(#249): T-SQL / SQL Server syntax support (Phase 3) #701

Workflow file for this run

name: Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.24']
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: Build WASM
run: GOOS=js GOARCH=wasm go build -o /dev/null ./wasm/
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ['1.21', '1.24']
env:
# Prevent Go from auto-downloading toolchain which conflicts with setup-go cache
GOTOOLCHAIN: local
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: true
- name: Get dependencies
run: go mod download
- name: Run tests
run: go test -v -race -coverprofile coverage.txt -covermode atomic ./pkg/...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.txt
flags: unittests
name: codecov-${{ matrix.os }}-${{ matrix.go }}
continue-on-error: true
race-check:
name: Race Detector
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Run tests with race detector
run: go test -race -short ./...
benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Run benchmarks
run: |
go test -run=^$ -bench=. -benchmem -timeout=5m ./pkg/sql/tokenizer/
go test -run=^$ -bench=. -benchmem -timeout=5m ./pkg/sql/parser/
go test -run=^$ -bench=. -benchmem -timeout=5m ./pkg/sql/ast/