diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
new file mode 100644
index 0000000..0333c64
--- /dev/null
+++ b/.github/workflows/testing.yml
@@ -0,0 +1,33 @@
+name: Test Site Modules and OS Path
+
+on:
+ push:
+ branches: [ main, master, develop ]
+ pull_request:
+ branches: [ main, master, develop ]
+ workflow_dispatch:
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.11'
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+
+ - name: Run loadSearchApi test
+ run: |
+ PYTHONPATH=$PYTHONPATH:$(pwd) python -m Test.Util.loadSearchApi
+
+ - name: Run osPath test
+ run: |
+ PYTHONPATH=$PYTHONPATH:$(pwd) python -m Test.Util.osPath
\ No newline at end of file
diff --git a/README.md b/README.md
index c6b9520..bb349dd 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
+
@@ -32,6 +32,7 @@
# 📋 Table of Contents
- 🔄 [Update Domains](#update-domains)
+- 🌐 [Available Sites](https://arrowar.github.io/StreamingDirectory/)
- 🛠️ [Installation](#installation)
- 📦 [PyPI Installation](#1-pypi-installation)
- 🔄 [Automatic Installation](#2-automatic-installation)
@@ -72,6 +73,9 @@
+
+
+
## 1. PyPI Installation
diff --git a/StreamingCommunity/run.py b/StreamingCommunity/run.py
index 70d6f79..fb7e69d 100644
--- a/StreamingCommunity/run.py
+++ b/StreamingCommunity/run.py
@@ -143,7 +143,7 @@ def initialize():
sys.exit(0)
# Trending tmbd
- """if SHOW_TRENDING:
+ if SHOW_TRENDING:
print()
tmdb.display_trending_films()
tmdb.display_trending_tv_shows()
@@ -152,7 +152,7 @@ def initialize():
try:
git_update()
except:
- console.log("[red]Error with loading github.")"""
+ console.log("[red]Error with loading github.")
def restart_script():
"""Riavvia lo script con gli stessi argomenti della riga di comando."""
diff --git a/Test/Util/loadSearchApi.py b/Test/Util/loadSearchApi.py
new file mode 100644
index 0000000..a1d5ce0
--- /dev/null
+++ b/Test/Util/loadSearchApi.py
@@ -0,0 +1,37 @@
+# 22.03.25
+
+# Fix import
+import sys
+import os
+src_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
+sys.path.append(src_path)
+
+
+# Import
+import unittest
+import logging
+from StreamingCommunity.global_search import load_search_functions
+
+class TestLoadSearchFunctions(unittest.TestCase):
+ def test_load_search_functions_no_exceptions(self):
+ try:
+ logging.basicConfig(level=logging.INFO)
+
+ # Call the function to be tested
+ loaded_functions = load_search_functions()
+
+ # Verify that at least some modules were loaded
+ self.assertTrue(len(loaded_functions) > 0, "No modules were loaded")
+
+ # Print successfully loaded modules
+ print("\nSuccessfully loaded modules:")
+ for module_name, (_, use_for) in loaded_functions.items():
+ print(f"- {module_name} (type: {use_for})")
+
+ print(f"\nTotal modules loaded: {len(loaded_functions)}")
+
+ except Exception as e:
+ self.fail(f"Error during module loading: {str(e)}")
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file