Skip to content

Commit

Permalink
v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeet-chand committed Jun 8, 2024
1 parent 9fc1fe0 commit ef53bfe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
- name: Build for Windows
run: |
pyinstaller --onefile --noconsole --icon=assets/view_earth.ico --name=Heroes3MapLiker Heroes3MapLiker.py
# icacls "dist" /grant:r "Everyone:(OI)(CI)F" /T
ls dist
- name: Run Windows Tests
run: python tests.py
Expand Down Expand Up @@ -59,9 +57,8 @@ jobs:
- name: Build for macOS
run: |
pyinstaller --onefile --noconsole --icon=assets/view_earth.ico --name=Heroes3MapLiker_macos Heroes3MapLiker.py
chmod -R +rwx build
ls -l
ls -l build
chmod -R +rwx dist
ls -l dist
- name: Run macOS Tests
run: python tests.py
Expand Down Expand Up @@ -95,9 +92,6 @@ jobs:
- name: Build for Linux
run: |
pyinstaller --onefile --noconsole --icon=assets/view_earth.ico --name=Heroes3MapLiker_linux Heroes3MapLiker.py
chmod -R +rwx build
ls -l
ls -l build
- name: Run Linux Tests
run: python tests.py
Expand Down
7 changes: 5 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class TestGUI(unittest.TestCase):

def test_binary_execution(self):
"""
IMPORTANT: pyInstaller builds in /build but deploys binary in /dist
CI/CD workflow triggers on pushing this repo to upstream on Github.
Github actions will build binaries for Windows, MacOS, and Linux and run below command which
checks for GUI and runs auto close tk window then returns result of pass 0 or fail 0.
Expand All @@ -34,9 +37,9 @@ def test_binary_execution(self):
if sys.platform == 'win32' and not running_headless: # Check if running on Windows
binary_path = 'dist/Heroes3MapLiker.exe'
elif sys.platform == 'darwin' and not running_headless: # Check if running on macOS
binary_path = 'build/Heroes3MapLiker_macos'
binary_path = 'dist/Heroes3MapLiker_macos'
elif sys.platform.startswith('linux') and not running_headless: # Check if running on Linux and not headless
binary_path = 'build/Heroes3MapLiker_linux'
binary_path = 'dist/Heroes3MapLiker_linux'
else:
self.skipTest("Skipping test cannot find Operating System")
return
Expand Down

0 comments on commit ef53bfe

Please sign in to comment.