Skip to content

Commit 52c998d

Browse files
committed
WIP
1 parent 8e673ad commit 52c998d

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

.github/workflows/testing-all-oses.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,33 @@ jobs:
4242
cache-environment: true
4343
# Set the cache key in a way that the cache is invalidated every week on monday
4444
cache-environment-key: environment-${{ steps.year-and-week.outputs.year-and-week }}
45+
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y ffmpeg
49+
- if: ${{ startsWith(matrix.os, 'macos') }}
50+
run: |
51+
brew install ffmpeg
4552
- name: Run tests
4653
timeout-minutes: 40
4754
# The ignored files can somehow cause the test suite to timeout.
4855
# I have no idea yet on why this happens and how to fix it.
4956
# Even a module level skip is not enough, they need to be completely ignored.
5057
# TODO: fix those tests and drop the ignores
51-
run: micromamba run -n ci env QT_QPA_PLATFORM=offscreen pytest -v -n logical --durations=20 --cov=mslib
52-
--ignore=tests/_test_msui/test_sideview.py --ignore=tests/_test_msui/test_topview.py --ignore=tests/_test_msui/test_wms_control.py
58+
run: micromamba run -n ci
59+
${{ (startsWith(matrix.os, 'ubuntu') && 'xvfb-run -n 99') || ' ' }}
60+
./with-recording
61+
pytest -v
62+
-n logical
63+
--durations=20
64+
--cov=mslib
65+
--ignore=tests/_test_msui/test_sideview.py
66+
--ignore=tests/_test_msui/test_topview.py
67+
--ignore=tests/_test_msui/test_wms_control.py
5368
tests
69+
- name: Upload recording
70+
if: ${{ !cancelled() }}
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: ${{ matrix.os }}-recording
74+
path: recording.mp4

with-recording

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
set -euxo pipefail
3+
4+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
5+
ffmpeg -framerate 25 -f x11grab -i :99 recording.mp4 &
6+
recording_pid=$!
7+
elif [[ "$OSTYPE" == "darwin"* ]]; then
8+
ffmpeg -f avfoundation -list_devices true -i ""
9+
ffmpeg -framerate 25 -f avfoundation -i 0:0 recording.mp4 &
10+
recording_pid=$!
11+
fi
12+
13+
trap 'kill $recording_pid' EXIT
14+
15+
"$@"

0 commit comments

Comments
 (0)