-
Notifications
You must be signed in to change notification settings - Fork 77
137 lines (137 loc) · 4.54 KB
/
tests.yml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: tests
on:
push:
branches:
- master
- release-*
pull_request:
workflow_dispatch:
jobs:
unit:
concurrency:
group: unit-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
go-version: [1.20.x, 1.21.x, 1.22.x]
os: [ubuntu, windows, macOS]
env:
OS: ${{ matrix.os }}-latest
GO: ${{ matrix.go-version }}
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Test
run: go test -race -coverprofile unit.txt -covermode atomic -v ./...
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
file: ./unit.txt
flags: unit,${{ matrix.os }},go-${{ matrix.go-version }}
name: unit
integration:
concurrency:
group: integration-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}-${{ matrix.ydb-version }}
cancel-in-progress: true
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [1.20.x, 1.21.x, 1.22.x]
ydb-version: [23.3, 24.1]
services:
ydb:
image: ydbplatform/local-ydb:${{ matrix.ydb-version }}
ports:
- 2135:2135
- 2136:2136
- 8765:8765
volumes:
- /tmp/ydb_certs:/ydb_certs
env:
YDB_LOCAL_SURVIVE_RESTART: true
YDB_USE_IN_MEMORY_PDISKS: true
YDB_TABLE_ENABLE_PREPARED_DDL: true
options: '-h localhost'
env:
OS: ubuntu-latest
GO: ${{ matrix.go-version }}
YDB_VERSION: ${{ matrix.ydb-version }}
YDB_CONNECTION_STRING: grpc://localhost:2136/local
YDB_CONNECTION_STRING_SECURE: grpcs://localhost:2135/local
YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem
YDB_SESSIONS_SHUTDOWN_URLS: http://localhost:8765/actors/kqp_proxy?force_shutdown=all
HIDE_APPLICATION_OUTPUT: 1
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Integration test
run: go test -race -tags integration -coverpkg=./... -coverprofile integration.txt -covermode atomic ./tests/integration
- name: Upload Test secure connection coverage report to Codecov
uses: codecov/codecov-action@v4
with:
file: ./integration.txt
flags: integration,${{ matrix.os }},go-${{ matrix.go-version }},ydb-${{ matrix.ydb-version }}
name: integration
experiment:
concurrency:
group: experiment-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}-${{ matrix.ydb-version }}
cancel-in-progress: true
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [1.22.x]
ydb-version: [24.1]
services:
ydb:
image: ydbplatform/local-ydb:${{ matrix.ydb-version }}
ports:
- 2135:2135
- 2136:2136
- 8765:8765
volumes:
- /tmp/ydb_certs:/ydb_certs
env:
YDB_LOCAL_SURVIVE_RESTART: true
YDB_USE_IN_MEMORY_PDISKS: true
YDB_TABLE_ENABLE_PREPARED_DDL: true
options: '-h localhost'
env:
OS: ubuntu-latest
GO: ${{ matrix.go-version }}
YDB_VERSION: ${{ matrix.ydb-version }}
YDB_CONNECTION_STRING: grpc://localhost:2136/local
YDB_CONNECTION_STRING_SECURE: grpcs://localhost:2135/local
YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem
YDB_SESSIONS_SHUTDOWN_URLS: http://localhost:8765/actors/kqp_proxy?force_shutdown=all
HIDE_APPLICATION_OUTPUT: 1
GOEXPERIMENT: rangefunc
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Integration test
run: go test -race -tags integration -coverpkg=./... -coverprofile experiment.txt -covermode atomic ./...
- name: Upload Test secure connection coverage report to Codecov
uses: codecov/codecov-action@v4
with:
file: ./integration-secure.txt
flags: experiment,${{ matrix.os }},go-${{ matrix.go-version }},ydb-${{ matrix.ydb-version }}
name: experiment