-
Notifications
You must be signed in to change notification settings - Fork 262
195 lines (163 loc) · 5.86 KB
/
integration.yml
File metadata and controls
195 lines (163 loc) · 5.86 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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: Integration Test
on:
push:
branches: [master, "feature/*"]
pull_request:
branches: [master, "feature/*"]
jobs:
integration-local:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.25.8
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Test
run: gotestsum --format short-verbose -- ./...
working-directory: integration_tests
integration-local-race:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.25.8
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Test
run: gotestsum --format short-verbose -- ./... -race
working-directory: integration_tests
integration-tikv:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.25.8
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Fetch PD
uses: shrink/actions-docker-extract@v1
id: extract-pd
with:
image: pingcap/pd:nightly
path: /pd-server
- name: Fetch TiKV
uses: shrink/actions-docker-extract@v1
id: extract-tikv
with:
image: pingcap/tikv:nightly
path: /tikv-server
- name: Run PD & TiKV
run: |
mv ../${{steps.extract-pd.outputs.destination}}/pd-server .
mv ../${{steps.extract-tikv.outputs.destination}}/tikv-server .
./pd-server > pd.log 2>&1 &
sleep 5
./tikv-server -C tikv.toml > tikv.log 2>&1 &
sleep 15
working-directory: integration_tests
- name: Test
run: gotestsum --format short-verbose -- --with-tikv
working-directory: integration_tests
integration-raw-tikv:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') }}
runs-on: ubuntu-latest
strategy:
matrix:
api_version: [v1ttl, v2]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.25.8
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Fetch PD
uses: shrink/actions-docker-extract@v1
id: extract-pd
with:
image: pingcap/pd:nightly
path: /pd-server
- name: Fetch TiKV
uses: shrink/actions-docker-extract@v1
id: extract-tikv
with:
image: pingcap/tikv:nightly
path: /tikv-server
- name: Run PD & TiKV
run: |
mv ../../${{steps.extract-pd.outputs.destination}}/pd-server .
mv ../../${{steps.extract-tikv.outputs.destination}}/tikv-server .
./pd-server > pd.log 2>&1 &
sleep 5
./tikv-server -C tikv-${{ matrix.api_version }}.toml > tikv.log 2>&1 &
sleep 15
working-directory: integration_tests/raw
- name: Test
run: gotestsum --format short-verbose -- --with-tikv
working-directory: integration_tests/raw
integration-next-gen-tikv:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.25.8
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Fetch PD
uses: shrink/actions-docker-extract@v1
id: extract-pd
with:
image: pingcap/pd:nightly
path: /pd-server
- name: Fetch Next-Gen TiKV
uses: shrink/actions-docker-extract@v1
id: extract-tikv
with:
image: gcr.io/pingcap-public/dbaas/tikv:dedicated-next-gen
path: /tikv-server
- name: Run MinIO, PD & Next-Gen TiKV
run: |
mkdir -p tikv-data
# Install and run minio for S3 backend
curl -Lo minio https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
mkdir -p $HOME/serverless_s3/cse-test
MINIO_ROOT_USER=minioadmin MINIO_ROOT_PASSWORD=minioadmin ./minio server $HOME/serverless_s3 > minio.log 2>&1 &
sleep 5
# Move binaries and run servers
mv ../${{steps.extract-pd.outputs.destination}}/pd-server .
mv ../${{steps.extract-tikv.outputs.destination}}/tikv-server .
./pd-server --config pd_next_gen.toml > pd.log 2>&1 &
sleep 5
./tikv-server -C tikv_next_gen.toml --pd-endpoints="127.0.0.1:2379" --addr="127.0.0.1:20160" --data-dir=${{ github.workspace }}/integration_tests/tikv-data > tikv.log 2>&1 &
echo "Waiting for servers to start..."
sleep 15
echo "--- MinIO Log ---"
tail minio.log || echo "minio.log not found"
echo "--- PD Log ---"
tail pd.log || echo "pd.log not found"
echo "--- TiKV Log ---"
tail tikv.log || echo "tikv.log not found"
working-directory: integration_tests
- name: Test
run: gotestsum --format short-verbose -- -parallel 1 -tags=nextgen --with-tikv --keyspace-name='keyspace1'
working-directory: integration_tests