-
-
Notifications
You must be signed in to change notification settings - Fork 59
67 lines (65 loc) · 2.17 KB
/
test.yml
File metadata and controls
67 lines (65 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Test
on: [pull_request]
concurrency:
group: test-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Set timezone for Unix
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: "America/Los_Angeles"
timezoneMacos: "America/Los_Angeles"
- name: Set timezone for Windows
if: ${{ matrix.platform == 'windows-latest' }}
shell: pwsh
run: |
tzutil /s "Pacific Standard Time"
tzutil /g
Get-TimeZone
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
id: go
- name: Install ICU4C (MacOS)
if: ${{ matrix.platform == 'macos-latest' }}
run: |
dir=$(brew --cellar icu4c)
dir="$dir"/$(ls "$dir")
echo CGO_CPPFLAGS=-I$dir/include >> $GITHUB_ENV
echo CGO_LDFLAGS=-L$dir/lib >> $GITHUB_ENV
- name: Install ICU4C (Windows)
if: ${{ matrix.platform == 'windows-latest' }}
uses: msys2/setup-msys2@v2
with:
path-type: inherit
msystem: UCRT64
pacboy: icu:p toolchain:p pkg-config:p
- name: Build SQL Syntax
run: ./build.sh
working-directory: ./postgres/parser
shell: bash
- name: Setup PostgreSQL
uses: tj-actions/install-postgresql@v3
with:
postgresql-version: 15
- name: Test (MacOS)
if: ${{ matrix.platform == 'macos-latest' }}
run: go test --timeout=20m -skip="TestReplication" $(go list ./... | grep -v enginetest)
- name: Test (Windows)
if: ${{ matrix.platform == 'windows-latest' }}
shell: msys2 {0}
run: go.exe test --timeout=20m -skip="TestReplication" $(go.exe list ./... | grep -v enginetest)
- name: Test (Linux)
if: ${{ matrix.platform == 'ubuntu-latest' }}
# Enginetest harness breaks with race testing, not sure why yet
run: go test --timeout=20m -race -skip="TestReplication" $(go list ./... | grep -v enginetest)