mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-07-03 04:23:59 +03:00
Refactor integration workflow and enhance debugging output in tests
This commit is contained in:
@@ -16,7 +16,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: https://gitea.com/actions/checkout@v5
|
||||
uses: "https://gitea.com/actions/checkout@v5"
|
||||
|
||||
- name: Make bundled linux binaries executable (if present)
|
||||
run: |
|
||||
@@ -36,8 +36,10 @@ jobs:
|
||||
python -m pip install -e .[test] || python -m pip install -e .
|
||||
python -m pip install pytest
|
||||
|
||||
- name: Run integration test
|
||||
- name: Run integration script directly
|
||||
env:
|
||||
YTPL_DEBUG: '1'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
. .venv/bin/activate
|
||||
python -m pytest -q tests/integration_full_workflow_test.py
|
||||
python tests/integration_full_workflow_test.py
|
||||
@@ -77,7 +77,8 @@ failed = False
|
||||
for mode in MODES:
|
||||
print(f"\n=== Running mode: {mode} ===")
|
||||
cfg = TempConfig()
|
||||
cfg.debug = False
|
||||
# Allow enabling verbose subprocess output from CI by setting YTPL_DEBUG=1
|
||||
cfg.debug = bool(os.getenv("YTPL_DEBUG", "0") == "1")
|
||||
cfg.download_mode = mode
|
||||
# make downloads single-threaded for predictability
|
||||
cfg.max_parallel_downloads = 1
|
||||
@@ -94,6 +95,13 @@ for mode in MODES:
|
||||
playlist = {"url": playlist_url, "save_path": str(save_path), "archive": f"archive_{mode}.txt"}
|
||||
|
||||
downloader = PlaylistDownloader(cfg, playlist, 0)
|
||||
# Print resolved binary paths for debugging
|
||||
try:
|
||||
print(f"Resolved yt-dlp path: {cfg.yt_dlp_path}")
|
||||
print(f"Resolved ffmpeg path: {cfg.ffmpeg_path}")
|
||||
print(f"Resolved aria2c path: {cfg.aria2c_path}")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
start = time.time()
|
||||
|
||||
Reference in New Issue
Block a user