fix: Simplify CI workflow by removing unnecessary path filters and improve test runner output handling

This commit is contained in:
HimanshuJ16
2026-08-07 07:37:46 +05:30
parent 5caf147999
commit a80d9cc8c7
2 changed files with 6 additions and 11 deletions
+2 -10
View File
@@ -2,17 +2,9 @@ name: Validate & Test Skills
on:
push:
paths:
- "skills/**"
- "index.json"
- "tools/**"
- "requirements*.txt"
branches: [ main, master ]
pull_request:
paths:
- "skills/**"
- "index.json"
- "tools/**"
- "requirements*.txt"
branches: [ main, master ]
jobs:
validate-and-test:
+4 -1
View File
@@ -12,6 +12,8 @@ import sys
import time
import unittest
import io
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SKILLS_DIR = os.path.join(ROOT_DIR, "skills")
@@ -31,6 +33,7 @@ def run_all_tests():
total_failures = 0
total_errors = 0
failed_files = []
devnull_stream = io.StringIO()
for test_file in test_files:
rel_path = os.path.relpath(test_file, ROOT_DIR)
@@ -48,7 +51,7 @@ def run_all_tests():
try:
loader = unittest.TestLoader()
suite = loader.discover(script_dir, pattern=os.path.basename(test_file))
runner = unittest.TextTestRunner(stream=open(os.devnull, "w"), verbosity=0)
runner = unittest.TextTestRunner(stream=devnull_stream, verbosity=0)
result = runner.run(suite)
total_runs += result.testsRun