Skip to content

Commit 0775609

Browse files
committed
Update GitHub Actions workflow to ensure test results are committed correctly
- Moved Git configuration commands to ensure they are set before committing test results. - Added missing newline at the end of the file for better formatting. - Ensured the test results directory is created and populated before committing changes, enhancing reliability in result uploads.
1 parent 9cf0f8a commit 0775609

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,16 @@ jobs:
165165

166166
- name: Create test results branch
167167
run: |
168-
git config --local user.email "action@github.com"
169-
git config --local user.name "GitHub Action"
170168
git checkout -b test-results
171-
mkdir -p test_results
169+
172170
cp test_report.md test_results/
173171
cp json_output.txt test_results/
174172
cp csv_output.txt test_results/
173+
175174
git add -f test_results/
175+
176+
git config --local user.email "action@github.com"
177+
git config --local user.name "GitHub Action"
176178
git commit -m "Update test results [skip ci]" || exit 0
179+
177180
git push -f origin test-results

0 commit comments

Comments
 (0)