File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -49,22 +49,33 @@ jobs:
49
49
50
50
- name : Install dependencies
51
51
run : |
52
- # pip causes unit tests to crash when combined with uv, so avoid installing it
53
- # uv pip install 'pip==25.1.1'
54
- uv pip install --editable .[dev]
52
+ uv pip install .[dev]
55
53
56
54
- name : Install apt packages
57
55
run : |
58
56
sudo apt-get update
59
57
sudo apt-get install -y xvfb
60
58
59
+ - name : Setup virtual display
60
+ run : |
61
+ export DISPLAY=:99.0
62
+ Xvfb :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset &
63
+ sleep 3 # Give Xvfb time to start
64
+
61
65
- name : Test with pytest
62
66
id : pytest
63
67
continue-on-error : false
68
+ env :
69
+ # Ensure proper X11 and GUI environment
70
+ DISPLAY : " :99.0"
71
+ QT_QPA_PLATFORM : " offscreen"
72
+ MPLBACKEND : " Agg"
73
+ PYTHONPATH : ${{ github.workspace }}
74
+ CI : " true" # Mark as CI environment
64
75
run : |
65
- export DISPLAY=:99
66
- Xvfb :99 -screen 0 1024x768x16 &
67
- uv run pytest --cov=ardupilot_methodic_configurator --cov-report=xml:tests/coverage.xml --md=tests/results-${{ matrix.python-version }}.md --junit-xml=tests/results-junit.xml
76
+ # Ensure X11 forwarding works
77
+ xset q || echo "X11 not fully ready, continuing anyway"
78
+ uv run --python=${{ matrix.python-version }} pytest --cov=ardupilot_methodic_configurator --cov-report=xml:tests/coverage.xml --md=tests/results-${{ matrix.python-version }}.md --junit-xml=tests/results-junit.xml
68
79
69
80
- name : Fix coverage paths
70
81
run : |
You can’t perform that action at this time.
0 commit comments