Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
matrss committed Jun 11, 2024
1 parent 8e673ad commit 7547fa7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/testing-all-oses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,33 @@ jobs:
cache-environment: true
# Set the cache key in a way that the cache is invalidated every week on monday
cache-environment-key: environment-${{ steps.year-and-week.outputs.year-and-week }}
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- if: ${{ startsWith(matrix.os, 'macos') }}
run: |
brew install ffmpeg
- name: Run tests
timeout-minutes: 40
# The ignored files can somehow cause the test suite to timeout.
# I have no idea yet on why this happens and how to fix it.
# Even a module level skip is not enough, they need to be completely ignored.
# TODO: fix those tests and drop the ignores
run: micromamba run -n ci env QT_QPA_PLATFORM=offscreen pytest -v -n logical --durations=20 --cov=mslib
--ignore=tests/_test_msui/test_sideview.py --ignore=tests/_test_msui/test_topview.py --ignore=tests/_test_msui/test_wms_control.py
run: micromamba run -n ci
${{ (startsWith(matrix.os, 'ubuntu') && 'xvfb-run -n 99') || ' ' }}
./with-recording
pytest -v
-n logical
--durations=20
--cov=mslib
--ignore=tests/_test_msui/test_sideview.py
--ignore=tests/_test_msui/test_topview.py
--ignore=tests/_test_msui/test_wms_control.py
tests
- name: Upload recording
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-recording
path: recording.mp4
14 changes: 14 additions & 0 deletions with-recording
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euxo pipefail

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
ffmpeg -framerate 25 -f x11grab -i :99 recording.mp4 &
recording_pid=$!
elif [[ "$OSTYPE" == "darwin"* ]]; then
ffmpeg -framerate 25 -f avfoundation -i 0:0 recording.mp4 &
recording_pid=$!
fi

trap 'kill $recording_pid' EXIT

"$@"

0 comments on commit 7547fa7

Please sign in to comment.