Skip to content

Commit e8b3972

Browse files
committed
ci: record screen
1 parent 468a8f5 commit e8b3972

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/ui-tests.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ jobs:
8585
chromedriver --version
8686
echo "Chrome Version:"
8787
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --version
88+
- name: Install ffmpeg
89+
run: |
90+
if ! command -v ffmpeg &> /dev/null; then
91+
echo "ffmpeg not found, installing..."
92+
brew install ffmpeg
93+
else
94+
echo "ffmpeg is already installed."
95+
fi
8896
- name: Install dependencies
8997
run: pip install selenium
9098
- name: Install dependencies (Mac)
@@ -96,10 +104,22 @@ jobs:
96104
else
97105
pip install -r "sample/Tests/requirements-mobile.txt"
98106
fi
107+
- name: Start screen recording
108+
run: |
109+
mkdir -p recordings
110+
ffmpeg -y -f avfoundation -video_size 1440x900 -framerate 30 -i "1" recordings/test_recording.mp4 > /dev/null 2>&1 &
99111
- name: Run UI tests
100112
env:
101113
UNITY_APP_PATH: SampleApp.app
102114
UNITY_APP_NAME: SampleApp
103115
MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }}
104116
working-directory: sample/Tests
105-
run: ${{ matrix.test_script }}
117+
run: ${{ matrix.test_script }}
118+
- name: Stop screen recording
119+
run: |
120+
pkill -f ffmpeg
121+
- name: Upload screen recording
122+
uses: actions/upload-artifact@v4
123+
with:
124+
name: ScreenRecording-${{ matrix.targetPlatform }}
125+
path: recordings/test_recording.mp4

0 commit comments

Comments
 (0)