From 7b704a1e219754a34c3440e81dd51416fd8cd060 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 25 Oct 2025 19:54:50 +0300 Subject: [PATCH] fixes to integration workflow --- .gitea/workflows/integration.yml | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .gitea/workflows/integration.yml diff --git a/.gitea/workflows/integration.yml b/.gitea/workflows/integration.yml new file mode 100644 index 0000000..59aad1f --- /dev/null +++ b/.gitea/workflows/integration.yml @@ -0,0 +1,43 @@ +name: Integration tests (full workflow) + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + integration: + name: Run integration full-workflow tests + runs-on: ubuntu-latest + env: + # opt-in flag consumed by the integration script + INTEGRATION_TEST: '1' + # default playlist (override via repo secret or workflow dispatch if desired) + TEST_PLAYLIST_URL: 'https://www.youtube.com/playlist?list=PLUmRr21IDW9WCW87FnbWAbIwwZHbf-lAz' + + steps: + - name: Checkout repository + uses: https://gitea.com/actions/checkout@v5 + + - name: Install system packages (Python, ffmpeg, aria2) + run: | + sudo apt-get update -y + sudo apt-get install -y python3 python3-pip ffmpeg aria2 + + - name: Install yt-dlp + run: | + python3 -m pip install --upgrade pip + python3 -m pip install yt-dlp + + - name: Install project + run: python3 -m pip install -e . + + - name: Run integration test (gated) + # The integration test performs real downloads; gate it behind a repository secret. + if: ${{ secrets.RUN_INTEGRATION_TESTS == 'true' }} + run: python3 tests/integration_full_workflow_test.py + + - name: Skip integration test (not enabled) + if: ${{ secrets.RUN_INTEGRATION_TESTS != 'true' }} + run: echo "Integration tests are skipped. To enable set the repository secret RUN_INTEGRATION_TESTS = 'true'."