Skip to content

Commit c9e9672

Browse files
committed
Batch 3: Standardized all 43 workflows to Batch 1 style and finalized all repairs
1 parent 85509d3 commit c9e9672

43 files changed

Lines changed: 1942 additions & 986 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test-OVS.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -152,39 +152,39 @@ jobs:
152152
FAILED=0
153153
TOTAL_DURATION=0
154154
155-
# Check ovs-vsctl binary exists
155+
# Test 1 - Check ovs-vsctl binary exists
156156
if [ "${{ steps.test1.outputs.status }}" == "passed" ]; then
157157
PASSED=$((PASSED + 1))
158158
else
159159
FAILED=$((FAILED + 1))
160160
fi
161161
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test1.outputs.duration || 0 }}))
162162
163-
# Check ovs version command
163+
# Test 2 - Check ovs version command
164164
if [ "${{ steps.test2.outputs.status }}" == "passed" ]; then
165165
PASSED=$((PASSED + 1))
166166
else
167167
FAILED=$((FAILED + 1))
168168
fi
169169
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test2.outputs.duration || 0 }}))
170170
171-
# Check ovs service status (smoke check only)
171+
# Test 3 - Check ovs service status (smoke check only)
172172
if [ "${{ steps.test3.outputs.status }}" == "passed" ]; then
173173
PASSED=$((PASSED + 1))
174174
else
175175
FAILED=$((FAILED + 1))
176176
fi
177177
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test3.outputs.duration || 0 }}))
178178
179-
# Architecture Verification
179+
# Test 4 - Architecture Verification
180180
if [ "${{ steps.test4.outputs.status }}" == "passed" ]; then
181181
PASSED=$((PASSED + 1))
182182
else
183183
FAILED=$((FAILED + 1))
184184
fi
185185
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test4.outputs.duration || 0 }}))
186186
187-
# Functional Validation
187+
# Test 5 - Functional Validation
188188
if [ "${{ steps.test5.outputs.status }}" == "passed" ]; then
189189
PASSED=$((PASSED + 1))
190190
else
@@ -207,6 +207,14 @@ jobs:
207207
- name: Generate test results JSON
208208
if: always()
209209
run: |
210+
# Fetch the direct job URL for deep-linking
211+
JOB_ID="${{ github.job }}"
212+
JOB_URL=$(GH_TOKEN=${{ github.token }} gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs --jq ".jobs[] | select(.name == \"$JOB_ID / $JOB_ID\" or .name == \"$JOB_ID\") | .html_url" | head -n 1)
213+
214+
if [ -z "$JOB_URL" ]; then
215+
JOB_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}?check_suite_focus=true&query=job:$JOB_ID"
216+
fi
217+
210218
mkdir -p test-results
211219
212220
cat > test-results/OVS.json << EOF
@@ -215,12 +223,12 @@ jobs:
215223
"package": {
216224
"name": "Open vSwitch (OVS)",
217225
"version": "${{ steps.version.outputs.version }}",
218-
"language": "Networking",
219-
"category": "Networking"
226+
"language": "REPLACE_ME",
227+
"category": "REPLACE_ME"
220228
},
221229
"run": {
222230
"id": "${{ github.run_id }}",
223-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}?query=job:${{ github.job }}",
231+
"url": "$JOB_URL",
224232
"timestamp": "${{ steps.metadata.outputs.timestamp }}",
225233
"status": "${{ steps.summary.outputs.overall_status }}",
226234
"runner": {
@@ -235,27 +243,27 @@ jobs:
235243
"duration_seconds": ${{ steps.summary.outputs.duration || 0 }},
236244
"details": [
237245
{
238-
"name": "Check ovs-vsctl binary exists",
246+
"name": "Test 1 - Check ovs-vsctl binary exists",
239247
"status": "${{ steps.test1.outputs.status || 'skipped' }}",
240248
"duration_seconds": ${{ steps.test1.outputs.duration || 0 }}
241249
},
242250
{
243-
"name": "Check ovs version command",
251+
"name": "Test 2 - Check ovs version command",
244252
"status": "${{ steps.test2.outputs.status || 'skipped' }}",
245253
"duration_seconds": ${{ steps.test2.outputs.duration || 0 }}
246254
},
247255
{
248-
"name": "Check ovs service status (smoke check only)",
256+
"name": "Test 3 - Check ovs service status (smoke check only)",
249257
"status": "${{ steps.test3.outputs.status || 'skipped' }}",
250258
"duration_seconds": ${{ steps.test3.outputs.duration || 0 }}
251259
},
252260
{
253-
"name": "Architecture Verification",
261+
"name": "Test 4 - Architecture Verification",
254262
"status": "${{ steps.test4.outputs.status || 'skipped' }}",
255263
"duration_seconds": ${{ steps.test4.outputs.duration || 0 }}
256264
},
257265
{
258-
"name": "Functional Validation",
266+
"name": "Test 5 - Functional Validation",
259267
"status": "${{ steps.test5.outputs.status || 'skipped' }}",
260268
"duration_seconds": ${{ steps.test5.outputs.duration || 0 }}
261269
}
@@ -270,15 +278,13 @@ jobs:
270278
271279
echo "Generated test results:"
272280
cat test-results/OVS.json
273-
274281
- name: Upload test results
275282
if: always()
276283
uses: actions/upload-artifact@v4
277284
with:
278-
name: ovs-test-results
285+
name: OVS-test-results
279286
path: test-results/OVS.json
280287
retention-days: 90
281-
282288
- name: Create test summary
283289
if: always()
284290
run: |
@@ -292,8 +298,8 @@ jobs:
292298
echo "- **Runner:** ubuntu-24.04 (arm64)" >> $GITHUB_STEP_SUMMARY
293299
echo "" >> $GITHUB_STEP_SUMMARY
294300
echo "### Test Details" >> $GITHUB_STEP_SUMMARY
295-
echo "1. Check ovs binary exists: ${{ steps.test1.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY
296-
echo "2. Check ovs version command: ${{ steps.test2.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY
297-
echo "3. Check ovs help output: ${{ steps.test3.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY
301+
echo "1. Test 1 - Check ovs-vsctl binary exists: ${{ steps.test1.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY
302+
echo "2. Test 2 - Check ovs version command: ${{ steps.test2.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY
303+
echo "3. Test 3 - Check ovs service status (smoke check only): ${{ steps.test3.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY
298304
echo "4. Test 4 - Architecture Verification: ${{ steps.test4.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY
299305
echo "5. Test 5 - Functional Validation: ${{ steps.test5.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY

.github/workflows/test-OpenEBS.yml

Lines changed: 74 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,27 @@ jobs:
8989
PASSED=0
9090
FAILED=0
9191
TOTAL_DURATION=0
92-
93-
if [ "${{ steps.test1.outputs.status }}" == "passed" ]; then PASSED=$((PASSED + 1)); else FAILED=$((FAILED + 1)); fi
92+
93+
# Test 1 - Helm Template Verification
94+
if [ "${{ steps.test1.outputs.status }}" == "passed" ]; then
95+
PASSED=$((PASSED + 1))
96+
else
97+
FAILED=$((FAILED + 1))
98+
fi
9499
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test1.outputs.duration || 0 }}))
95-
96-
if [ "${{ steps.test2.outputs.status }}" == "passed" ]; then PASSED=$((PASSED + 1)); else FAILED=$((FAILED + 1)); fi
100+
101+
# Test 2 - Architecture Verification
102+
if [ "${{ steps.test2.outputs.status }}" == "passed" ]; then
103+
PASSED=$((PASSED + 1))
104+
else
105+
FAILED=$((FAILED + 1))
106+
fi
97107
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test2.outputs.duration || 0 }}))
98-
108+
99109
echo "passed=$PASSED" >> $GITHUB_OUTPUT
100110
echo "failed=$FAILED" >> $GITHUB_OUTPUT
101111
echo "duration=$TOTAL_DURATION" >> $GITHUB_OUTPUT
102-
112+
103113
if [ $FAILED -eq 0 ]; then
104114
echo "overall_status=success" >> $GITHUB_OUTPUT
105115
echo "badge_status=passing" >> $GITHUB_OUTPUT
@@ -108,37 +118,84 @@ jobs:
108118
echo "badge_status=failing" >> $GITHUB_OUTPUT
109119
exit 1
110120
fi
111-
112-
113121
- name: Generate test results JSON
114122
if: always()
115123
run: |
124+
# Fetch the direct job URL for deep-linking
125+
JOB_ID="${{ github.job }}"
126+
JOB_URL=$(GH_TOKEN=${{ github.token }} gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs --jq ".jobs[] | select(.name == \"$JOB_ID / $JOB_ID\" or .name == \"$JOB_ID\") | .html_url" | head -n 1)
127+
128+
if [ -z "$JOB_URL" ]; then
129+
JOB_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}?check_suite_focus=true&query=job:$JOB_ID"
130+
fi
131+
116132
mkdir -p test-results
117-
cat > test-results/openebs.json << EOF
133+
134+
cat > test-results/OpenEBS.json << EOF
118135
{
119136
"schema_version": "1.0",
120137
"package": {
121138
"name": "OpenEBS",
122139
"version": "${{ steps.version.outputs.version }}",
123-
"language": "Storage",
124-
"category": "Storage"
140+
"language": "REPLACE_ME",
141+
"category": "REPLACE_ME"
125142
},
126143
"run": {
127-
"status": "${{ steps.summary.outputs.overall_status }}",
144+
"id": "${{ github.run_id }}",
145+
"url": "$JOB_URL",
128146
"timestamp": "${{ steps.metadata.outputs.timestamp }}",
129-
"arch": "arm64"
147+
"status": "${{ steps.summary.outputs.overall_status }}",
148+
"runner": {
149+
"os": "ubuntu-24.04",
150+
"arch": "arm64"
151+
}
130152
},
131153
"tests": {
132154
"passed": ${{ steps.summary.outputs.passed }},
133-
"failed": ${{ steps.summary.outputs.failed }}
155+
"failed": ${{ steps.summary.outputs.failed }},
156+
"skipped": 0,
157+
"duration_seconds": ${{ steps.summary.outputs.duration || 0 }},
158+
"details": [
159+
{
160+
"name": "Test 1 - Helm Template Verification",
161+
"status": "${{ steps.test1.outputs.status || 'skipped' }}",
162+
"duration_seconds": ${{ steps.test1.outputs.duration || 0 }}
163+
},
164+
{
165+
"name": "Test 2 - Architecture Verification",
166+
"status": "${{ steps.test2.outputs.status || 'skipped' }}",
167+
"duration_seconds": ${{ steps.test2.outputs.duration || 0 }}
168+
}
169+
]
170+
},
171+
"metadata": {
172+
"dashboard_link": "${{ steps.metadata.outputs.dashboard_link }}",
173+
"badge_status": "${{ steps.summary.outputs.badge_status }}"
134174
}
135175
}
136176
EOF
137-
177+
178+
echo "Generated test results:"
179+
cat test-results/OpenEBS.json
138180
- name: Upload test results
139181
if: always()
140182
uses: actions/upload-artifact@v4
141183
with:
142-
name: openebs-test-results
143-
path: test-results/openebs.json
184+
name: OpenEBS-test-results
185+
path: test-results/OpenEBS.json
144186
retention-days: 90
187+
- name: Create test summary
188+
if: always()
189+
run: |
190+
echo "## OpenEBS Test Results" >> $GITHUB_STEP_SUMMARY
191+
echo "" >> $GITHUB_STEP_SUMMARY
192+
echo "- **Version:** ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
193+
echo "- **Status:** ${{ steps.summary.outputs.overall_status }}" >> $GITHUB_STEP_SUMMARY
194+
echo "- **Tests Passed:** ${{ steps.summary.outputs.passed }}" >> $GITHUB_STEP_SUMMARY
195+
echo "- **Tests Failed:** ${{ steps.summary.outputs.failed }}" >> $GITHUB_STEP_SUMMARY
196+
echo "- **Duration:** ${{ steps.summary.outputs.duration || 0 }}s" >> $GITHUB_STEP_SUMMARY
197+
echo "- **Runner:** ubuntu-24.04 (arm64)" >> $GITHUB_STEP_SUMMARY
198+
echo "" >> $GITHUB_STEP_SUMMARY
199+
echo "### Test Details" >> $GITHUB_STEP_SUMMARY
200+
echo "1. Test 1 - Helm Template Verification: ${{ steps.test1.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY
201+
echo "2. Test 2 - Architecture Verification: ${{ steps.test2.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)