Skip to content

Commit 678d0b2

Browse files
author
Arghya Dutta
committed
Updated submodule init in workflow
1 parent 7eec8d2 commit 678d0b2

1 file changed

Lines changed: 53 additions & 46 deletions

File tree

.github/workflows/sample_unit_test copy.yaml

Lines changed: 53 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
steps:
2424
- name: "Checkout code"
2525
uses: actions/checkout@v4
26+
with:
27+
submodules: recursive
28+
fetch-depth: 0
2629

2730
- name: "Install jq"
2831
run: sudo apt-get update && sudo apt-get install -y jq
@@ -120,6 +123,9 @@ jobs:
120123
steps:
121124
- name: "Checkout code"
122125
uses: actions/checkout@v4
126+
with:
127+
submodules: recursive
128+
fetch-depth: 0
123129

124130
- name: "Set up Python"
125131
uses: actions/setup-python@v4
@@ -197,50 +203,49 @@ jobs:
197203
echo "test-files=" >> $GITHUB_OUTPUT
198204
fi
199205
200-
# - name: "Validate Existing GTest Unit Tests"
201-
# if: steps.mapping.outputs.has-mappings == 'true'
202-
# env:
203-
# LITELLM_TOKEN: ${{ secrets.LITELLM_TOKEN }}
204-
# TEST_FILES: ${{ steps.mapping.outputs.test-files }}
205-
# run: |
206-
# set -euo pipefail
207-
# echo "=== Validating Existing GTest Unit Tests ==="
208-
#
209-
# if [ -z "$TEST_FILES" ]; then
210-
# echo "No test files to validate"
211-
# exit 0
212-
# fi
213-
#
214-
# # Convert comma-separated test files to array
215-
# IFS=',' read -ra test_files <<< "$TEST_FILES"
216-
#
217-
# # Initialize validation results file
218-
# echo "=== Unit Test Validation Results ===" > validation_results.txt
219-
# echo "" >> validation_results.txt
220-
#
221-
# # Validate each test file
222-
# for test_file in "${test_files[@]}"; do
223-
# [ -z "$test_file" ] && continue
224-
#
225-
# echo "Validating: $test_file"
226-
#
227-
# # Run validation and capture result
228-
# if python3 internal/silabs/ai_unit_test/validate_with_litellm.py "$test_file" >> validation_results.txt 2>&1; then
229-
# echo "✅ Validation completed for: $test_file"
230-
# else
231-
# echo "⚠️ Validation had issues for: $test_file"
232-
# fi
233-
#
234-
# echo "" >> validation_results.txt
235-
# echo "---" >> validation_results.txt
236-
# echo "" >> validation_results.txt
237-
# done
238-
#
239-
# # Display all validation results
240-
# echo ""
241-
# echo "=== COMPLETE VALIDATION RESULTS ==="
242-
# cat validation_results.txt
243-
206+
# - name: "Validate Existing GTest Unit Tests"
207+
# if: steps.mapping.outputs.has-mappings == 'true'
208+
# env:
209+
# LITELLM_TOKEN: ${{ secrets.LITELLM_TOKEN }}
210+
# TEST_FILES: ${{ steps.mapping.outputs.test-files }}
211+
# run: |
212+
# set -euo pipefail
213+
# echo "=== Validating Existing GTest Unit Tests ==="
214+
#
215+
# if [ -z "$TEST_FILES" ]; then
216+
# echo "No test files to validate"
217+
# exit 0
218+
# fi
219+
#
220+
# # Convert comma-separated test files to array
221+
# IFS=',' read -ra test_files <<< "$TEST_FILES"
222+
#
223+
# # Initialize validation results file
224+
# echo "=== Unit Test Validation Results ===" > validation_results.txt
225+
# echo "" >> validation_results.txt
226+
#
227+
# # Validate each test file
228+
# for test_file in "${test_files[@]}"; do
229+
# [ -z "$test_file" ] && continue
230+
#
231+
# echo "Validating: $test_file"
232+
#
233+
# # Run validation and capture result
234+
# if python3 internal/silabs/ai_unit_test/validate_with_litellm.py "$test_file" >> validation_results.txt 2>&1; then
235+
# echo "✅ Validation completed for: $test_file"
236+
# else
237+
# echo "⚠️ Validation had issues for: $test_file"
238+
# fi
239+
#
240+
# echo "" >> validation_results.txt
241+
# echo "---" >> validation_results.txt
242+
# echo "" >> validation_results.txt
243+
# done
244+
#
245+
# # Display all validation results
246+
# echo ""
247+
# echo "=== COMPLETE VALIDATION RESULTS ==="
248+
# cat validation_results.txt
244249

245250
code-coverage-analysis:
246251
name: "Code Coverage Analysis"
@@ -251,6 +256,9 @@ jobs:
251256
steps:
252257
- name: "Checkout code"
253258
uses: actions/checkout@v4
259+
with:
260+
submodules: recursive
261+
fetch-depth: 0
254262

255263
- name: "Install lcov"
256264
run: |
@@ -262,7 +270,7 @@ jobs:
262270
run: |
263271
set -euo pipefail
264272
set +u
265-
source scripts/activate.sh
273+
source scripts/bootstrap.sh
266274
set -u
267275
gn gen out/coverage --args='use_coverage=true'
268276
ninja -C out/coverage check -k 0
@@ -336,7 +344,6 @@ jobs:
336344
exit 1
337345
fi
338346
339-
340347
# - name: "Post Code Coverage Comment on PR"
341348
# if: always()
342349
# uses: actions/github-script@v6

0 commit comments

Comments
 (0)