From 5563693fe677cfa6ff212b29af6ec7aacf533590 Mon Sep 17 00:00:00 2001 From: Sumeet Singh Date: Mon, 3 Jun 2024 05:05:07 +1000 Subject: [PATCH] v0.1 --- .github/workflows/actions.yml | 3 ++- tests.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index ac8e068..0af6cb3 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -66,7 +66,8 @@ jobs: - name: Install dependencies run: | - pip install Pillow requests pyinstaller pyautogui xvfbwrapper # for headless displays including xvfbwrapper + sudo apt-get install python3-tk + pip install Pillow requests pyinstaller pyautogui - name: Build for Linux run: | diff --git a/tests.py b/tests.py index 9fd6720..70c6680 100644 --- a/tests.py +++ b/tests.py @@ -34,9 +34,9 @@ def test_binary_execution(self): Returns: Return code. 0 = test passed. 1 = test failed. """ - if sys.platform == 'win32': # Check if running on Windows + if sys.platform == 'win32' and not running_headless: # Check if running on Windows binary_path = 'Heroes3MapLiker.exe' - elif sys.platform == 'darwin': # Check if running on macOS + elif sys.platform == 'darwin' and not running_headless: # Check if running on macOS binary_path = './Heroes3MapLiker' elif sys.platform.startswith('linux') and not running_headless: # Check if running on Linux and not headless binary_path = './Heroes3MapLiker' @@ -44,6 +44,7 @@ def test_binary_execution(self): self.skipTest("Skipping test in headless environment") return + # Start the binary process = subprocess.Popen([binary_path])