1111ROOT = Path (__file__ ).resolve ().parent .parent
1212SCRIPT = ROOT / 'tools.sh'
1313VENV_TEST = ROOT / '.venv_test'
14- PACKAGE_NAME = 'stat_log_db'
14+ PACKAGE_NAME = 'stat-log-db'
15+
16+ GITHUB_ACTIONS = os .getenv ("GITHUB_ACTIONS" ) == "true"
1517
1618#endregion
1719
@@ -82,13 +84,15 @@ def test_help():
8284 except AssertionError :
8385 assert out .strip () == readme_content .strip (), "Help output does not match README content (leading & trailing whitespace stripped)"
8486
87+ @pytest .mark .skipif (GITHUB_ACTIONS , reason = "Skipping test on GitHub Actions" )
8588def test_install_dev (test_venv ):
8689 code , out = run_tools (['-id' ], use_test_venv = True )
8790 assert code == 0
8891 assert 'Installing' in out
8992 assert 'dev' in out
9093 assert is_installed (PACKAGE_NAME ), 'Package should be installed after dev install'
9194
95+ @pytest .mark .skipif (GITHUB_ACTIONS , reason = "Skipping test on GitHub Actions" )
9296def test_install_normal (test_venv ):
9397 code , out = run_tools (['-in' ], use_test_venv = True )
9498 assert code == 0
@@ -102,6 +106,7 @@ def test_install_invalid_arg(test_venv):
102106 assert ('Unsupported argument' in out ) or ('Invalid install mode' in out )
103107 assert not is_installed (PACKAGE_NAME ), 'Package should not be installed after invalid install argument'
104108
109+ @pytest .mark .skipif (GITHUB_ACTIONS , reason = "Skipping test on GitHub Actions" )
105110def test_uninstall (test_venv ):
106111 # Ensure something installed first (dev mode)
107112 icode , iout = run_tools (['-id' ], use_test_venv = True )
@@ -113,6 +118,7 @@ def test_uninstall(test_venv):
113118 assert 'Uninstall complete' in uout
114119 assert not is_installed (PACKAGE_NAME ), 'Package should not be installed after uninstall'
115120
121+ @pytest .mark .skipif (GITHUB_ACTIONS , reason = "Skipping test on GitHub Actions" )
116122def test_install_and_clean_multi_flag (test_venv ):
117123 code , out = run_tools (['-id' , '-c' ], use_test_venv = True )
118124 assert code == 0
@@ -135,6 +141,7 @@ def test_test_invalid_arg():
135141 assert code == 1
136142 assert ('Unsupported argument' in out ) or ('Invalid test mode' in out )
137143
144+ @pytest .mark .skipif (GITHUB_ACTIONS , reason = "Skipping test on GitHub Actions" )
138145def test_clean ():
139146 code , out = run_tools (['-c' ])
140147 assert code == 0
0 commit comments