Repository navigation
278 lines (250 loc) · 9.2 KB
/
Copy path_test.yml
File metadata and controls
278 lines (250 loc) · 9.2 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: _test
on:
workflow_call:
inputs:
matrix:
type: string
required: true
description: "Selected component/task entries"
fail-fast:
type: boolean
default: true
secrets:
CODECOV_TOKEN:
required: false
permissions:
contents: read
security-events: write
pull-requests: write
jobs:
run:
name: ${{ matrix.name || matrix.task }}
strategy:
fail-fast: ${{ inputs.fail-fast }}
matrix: ${{ fromJSON(inputs.matrix) }}
# Select runner based on build target
runs-on: ${{
matrix.task == 'build-macos' && 'macos-15' ||
'ubuntu-26.04'
}}
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
# Python SDK
- name: Set up Docker Buildx for Python
if: matrix.component == 'sdk-python' && matrix.task == 'test'
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- name: Run Python SDK task
if: matrix.component == 'sdk-python'
uses: ./.github/actions/python-maturin/pre-merge
with:
task: ${{ matrix.task }}
- name: Upload Python coverage to Codecov
if: matrix.component == 'sdk-python' && matrix.task == 'test'
uses: codecov/codecov-action@v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: reports/python-coverage.lcov
disable_search: true
flags: python
fail_ci_if_error: false
verbose: true
override_pr: ${{ github.event.pull_request.number }}
# PHP SDK
- name: Run PHP SDK task
if: matrix.component == 'sdk-php'
uses: ./.github/actions/php/pre-merge
with:
task: ${{ matrix.task }}
- name: Upload PHP coverage to Codecov
if: matrix.component == 'sdk-php' && matrix.task == 'test'
uses: codecov/codecov-action@v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: reports/php-coverage.lcov
disable_search: true
flags: php
fail_ci_if_error: false
verbose: true
override_pr: ${{ github.event.pull_request.number }}
# Node SDK
- name: Run Node SDK task
if: matrix.component == 'sdk-node'
uses: ./.github/actions/node-npm/pre-merge
with:
task: ${{ matrix.task }}
- name: Upload Node coverage to Codecov
if: >-
matrix.component == 'sdk-node' &&
(matrix.task == 'test' ||
matrix.task == 'e2e')
uses: codecov/codecov-action@v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: >-
reports/node-coverage/${{
matrix.task == 'test' && 'unit' || matrix.task
}}/lcov.info
disable_search: true
flags: >-
${{ matrix.task == 'test' && 'node' ||
format('node-{0}', matrix.task) }}
fail_ci_if_error: false
verbose: true
override_pr: ${{ github.event.pull_request.number }}
# Go SDK
- name: Run Go SDK task
if: matrix.component == 'sdk-go'
uses: ./.github/actions/go/pre-merge
with:
task: ${{ matrix.task }}
- name: Upload Go coverage to Codecov
if: matrix.component == 'sdk-go' && (matrix.task == 'test' || matrix.task == 'e2e')
uses: codecov/codecov-action@v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: reports/${{ matrix.task == 'test' && 'go-coverage.out' || 'go-coverage-e2e.out' }}
disable_search: true
flags: go
fail_ci_if_error: false
verbose: true
override_pr: ${{ github.event.pull_request.number }}
# Java SDK
- name: Run Java SDK task
if: matrix.component == 'sdk-java'
uses: ./.github/actions/java-gradle/pre-merge
with:
task: ${{ matrix.task }}
# C# SDK
- name: Run C# SDK task
if: matrix.component == 'sdk-csharp'
uses: ./.github/actions/csharp-dotnet/pre-merge
with:
task: ${{ matrix.task }}
# C++ SDK
- name: Run C++ SDK Task
if: matrix.component == 'sdk-cpp'
uses: ./.github/actions/cpp-bazel/pre-merge
with:
task: ${{ matrix.task }}
# Swift SDK
- name: Run Swift SDK task
if: matrix.component == 'sdk-swift'
uses: ./.github/actions/swift/pre-merge
with:
task: ${{ matrix.task }}
- name: Upload C++ coverage to Codecov
if: matrix.component == 'sdk-cpp' && matrix.task == 'test'
uses: codecov/codecov-action@v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: reports/cpp-coverage.lcov
disable_search: true
flags: cpp
fail_ci_if_error: false
verbose: true
override_pr: ${{ github.event.pull_request.number }}
- name: Upload Java coverage to Codecov
if: matrix.component == 'sdk-java' && matrix.task == 'test'
uses: codecov/codecov-action@v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: reports/java-coverage/jacocoAggregated.xml
disable_search: true
flags: java
fail_ci_if_error: false
verbose: true
override_pr: ${{ github.event.pull_request.number }}
- name: Upload C# coverage to Codecov
if: matrix.component == 'sdk-csharp' && (matrix.task == 'test' || startsWith(matrix.task, 'e2e'))
uses: codecov/codecov-action@v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: foreign/csharp/reports/coverage.cobertura.xml
disable_search: true
flags: csharp
fail_ci_if_error: false
verbose: true
override_pr: ${{ github.event.pull_request.number }}
# Web UI
- name: Setup Node.js for Web UI
if: matrix.component == 'web-ui'
uses: actions/setup-node@v7
with:
node-version: "24"
package-manager-cache: false
- name: Run Web UI task
if: matrix.component == 'web-ui'
run: |
cd web
npm ci
if [ "${{ matrix.task }}" = "lint" ]; then
npm run lint
elif [ "${{ matrix.task }}" = "test" ]; then
npm test
elif [ "${{ matrix.task }}" = "build" ]; then
npm run build
fi
# Helm chart testing
- name: Setup Helm test tools
if: matrix.component == 'helm' && (matrix.task == 'validate' || matrix.task == 'smoke')
uses: ./.github/actions/utils/setup-helm-tools
with:
install-kind: ${{ matrix.task == 'smoke' }}
install-helm-docs: ${{ matrix.task == 'validate' }}
install-yamllint: ${{ matrix.task == 'validate' }}
install-helmfmt: ${{ matrix.task == 'validate' }}
- name: Setup Helm smoke cluster
if: matrix.component == 'helm' && matrix.task == 'smoke'
run: scripts/ci/setup-helm-smoke-cluster.sh
- name: Validate Helm chart
if: matrix.component == 'helm' && matrix.task == 'validate'
run: scripts/ci/test-helm.sh validate
- name: Smoke test Helm chart runtime
if: matrix.component == 'helm' && matrix.task == 'smoke'
run: scripts/ci/test-helm.sh smoke --cleanup
- name: Collect Helm smoke diagnostics
if: failure() && matrix.component == 'helm' && matrix.task == 'smoke'
run: scripts/ci/test-helm.sh collect-smoke-diagnostics
# CI workflow validation
- name: Validate CI workflows
if: matrix.component == 'ci-workflows' && matrix.task == 'validate'
run: |
echo "Validating GitHub Actions workflows..."
# Basic YAML validation
for workflow in .github/workflows/*.yml; do
echo "Checking $workflow"
python -c "import yaml; yaml.safe_load(open('$workflow'))" || exit 1
done
echo "All workflows are valid YAML"
python3 scripts/ci/test-runtime-artifacts.py
# Upload reports
- name: Upload reports
if: always()
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.component }}-${{ matrix.task }}-reports-${{ github.run_id }}-${{ github.run_attempt }}
path: |
reports/**
target/llvm-cov/**
coverage.lcov
codecov.json
if-no-files-found: ignore
retention-days: 7