Skip to content

Commit

Permalink
Attempt to run display linked tests in github
Browse files Browse the repository at this point in the history
  • Loading branch information
stixes committed Jun 29, 2024
1 parent 36daaa0 commit 6c5ee69
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Start virtual display
run: |
pip install pyvirtualdisplay
export DISPLAY=:99.0
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Lint with Ruff
run: |
pip install ruff
Expand Down
1 change: 0 additions & 1 deletion src/executor/executer_pico.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import utilities
import constants
from src.view.view_base import SettingsItem, MenuItem
import struct
from src.executor.executer_utilities import ExecuterUtilities
import serial

Expand Down
7 changes: 4 additions & 3 deletions tests/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# from src.executor.executer_pyautogui import PyAutoGuiExecuter
# from src.executor.executer_pynput import PynputExecuter
from src.executor.executer_pico import PicoPassthroughExecuter
from src.executor.executer_pyautogui import PyAutoGuiExecuter
from src.executor.executer_pynput import PynputExecuter
from src.executor.executer_xdotool import XdotoolExecuter
from src.loadouts import LoadoutManager
from src.settings import SettingsManager
Expand Down Expand Up @@ -43,9 +45,8 @@ def test_controller_should_initialize_correctly(model_mock):

@pytest.mark.parametrize("executor_constant, executor_class", [
(constants.EXECUTOR_ARDUINO, ArduinoPassthroughExecuter),
## Causes failure in Github due to missing display
# (constants.EXECUTOR_PYAUTOGUI, PyAutoGuiExecuter),
# (constants.EXECUTOR_PYNPUT, PynputExecuter),
(constants.EXECUTOR_PYAUTOGUI, PyAutoGuiExecuter),
(constants.EXECUTOR_PYNPUT, PynputExecuter),
(constants.EXECUTOR_PICO, PicoPassthroughExecuter),
(constants.EXECUTOR_XDOTOOL, XdotoolExecuter)
])
Expand Down

0 comments on commit 6c5ee69

Please sign in to comment.