Skip to content

Commit 89b2bbe

Browse files
committedMar 19, 2025
Add test video artifact capture and upload on failure
This ensures that video artifacts from the latest failed test are captured and uploaded for better debugging. The workflow now handles artifact management by copying the video files and uploading them automatically during test failures.
1 parent bb63f66 commit 89b2bbe

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
 

‎.github/workflows/gradle.yml

+17
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,23 @@ jobs:
5858
- name: Tests
5959
run: ./gradlew test
6060

61+
- name: Capture Test Artifacts on Failure
62+
if: failure()
63+
run: |
64+
mkdir -p artifacts/videos
65+
latest_file=$(ls -Art video | tail -n 1)
66+
if [ -n "$latest_file" ]; then
67+
cp "video/$latest_file" "artifacts/videos/latest-test-video.mp4"
68+
fi
69+
shell: bash
70+
71+
- name: Upload Test Video Artifact
72+
if: failure()
73+
uses: actions/upload-artifact@v3
74+
with:
75+
name: latest-test-video
76+
path: artifacts/videos/latest-test-video.avi
77+
6178
static-tests:
6279
runs-on: ubuntu-latest
6380

0 commit comments

Comments
 (0)