From bddf0591768a78f77fb2d51652ffb38ae7784c81 Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Mon, 30 Sep 2024 23:31:36 -0700 Subject: [PATCH] condense e2e --- .github/workflows/ci-windows.yaml | 76 +------------------ .github/workflows/ci.yaml | 119 +++--------------------------- 2 files changed, 13 insertions(+), 182 deletions(-) diff --git a/.github/workflows/ci-windows.yaml b/.github/workflows/ci-windows.yaml index 2ad02cd6..42d45131 100644 --- a/.github/workflows/ci-windows.yaml +++ b/.github/workflows/ci-windows.yaml @@ -78,7 +78,7 @@ jobs: python -m pip install -e .[test] python -m pytest --reruns 3 --reruns-delay 5 tests/integration/prebuilt_presets - test-soundcloud: + test-e2e: runs-on: windows-latest permissions: contents: read @@ -91,7 +91,7 @@ jobs: with: python-version: "3.10" - - name: Run e2e soundcloud tests with coverage + - name: Run e2e tests with coverage run: | curl.exe -L -o ffmpeg.zip https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip tar -xf ffmpeg.zip @@ -99,74 +99,4 @@ jobs: move "ffmpeg-master-latest-win64-gpl\bin\ffprobe.exe" "ffprobe.exe" python -m pip install -e .[test] - python -m pytest --reruns 3 --reruns-delay 5 tests/e2e/soundcloud - - test-bandcamp: - runs-on: windows-latest - permissions: - contents: read - - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Run e2e soundcloud tests with coverage - run: | - curl.exe -L -o ffmpeg.zip https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip - tar -xf ffmpeg.zip - move "ffmpeg-master-latest-win64-gpl\bin\ffmpeg.exe" "ffmpeg.exe" - move "ffmpeg-master-latest-win64-gpl\bin\ffprobe.exe" "ffprobe.exe" - - python -m pip install -e .[test] - python -m pytest --reruns 3 --reruns-delay 5 tests/e2e/bandcamp - - - test-youtube: - runs-on: windows-latest - permissions: - contents: read - - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Run e2e youtube tests with coverage - run: | - curl.exe -L -o ffmpeg.zip https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip - tar -xf ffmpeg.zip - move "ffmpeg-master-latest-win64-gpl\bin\ffmpeg.exe" "ffmpeg.exe" - move "ffmpeg-master-latest-win64-gpl\bin\ffprobe.exe" "ffprobe.exe" - - python -m pip install -e .[test] - python -m pytest --reruns 3 --reruns-delay 5 tests/e2e/youtube - - test-plugins: - runs-on: windows-latest - permissions: - contents: read - - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Run e2e plugin tests with coverage - run: | - curl.exe -L -o ffmpeg.zip https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip - tar -xf ffmpeg.zip - move "ffmpeg-master-latest-win64-gpl\bin\ffmpeg.exe" "ffmpeg.exe" - move "ffmpeg-master-latest-win64-gpl\bin\ffprobe.exe" "ffprobe.exe" - - python -m pip install -e .[test] - python -m pytest --reruns 3 --reruns-delay 5 tests/e2e/plugins + python -m pytest tests/e2e diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index be5d6be0..84a53f94 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -104,7 +104,7 @@ jobs: path: /opt/coverage/integration-prebuilt-presets key: ${{github.sha}}-coverage-integration-prebuilt-presets - test-soundcloud: + test-e2e: runs-on: ubuntu-22.04 permissions: contents: read @@ -117,90 +117,12 @@ jobs: with: python-version: "3.10" - - name: Run e2e soundcloud tests with coverage + - name: Run e2e tests with coverage run: | pip install -e .[test] sudo apt-get update sudo apt-get install -y ffmpeg - coverage run -m pytest --reruns 3 --reruns-delay 5 tests/e2e/soundcloud && coverage xml -o /opt/coverage/soundcloud/coverage.xml - - test-bandcamp: - runs-on: ubuntu-22.04 - permissions: - contents: read - - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Run e2e soundcloud tests with coverage - run: | - pip install -e .[test] - sudo apt-get update - sudo apt-get install -y ffmpeg - coverage run -m pytest --reruns 3 --reruns-delay 5 tests/e2e/bandcamp && coverage xml -o /opt/coverage/bandcamp/coverage.xml - - - name: Save coverage - uses: actions/cache@v3 - with: - path: /opt/coverage/bandcamp - key: ${{github.sha}}-coverage-bandcamp - - test-youtube: - runs-on: ubuntu-22.04 - permissions: - contents: read - - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Run e2e youtube tests with coverage - run: | - pip install -e .[test] - sudo apt-get update - sudo apt-get install -y ffmpeg - coverage run -m pytest --reruns 3 --reruns-delay 5 tests/e2e/youtube && coverage xml -o /opt/coverage/youtube/coverage.xml - - - name: Save coverage - uses: actions/cache@v3 - with: - path: /opt/coverage/youtube - key: ${{github.sha}}-coverage-youtube - - test-plugins: - runs-on: ubuntu-22.04 - permissions: - contents: read - - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Run e2e plugin tests with coverage - run: | - pip install -e .[test] - sudo apt-get update - sudo apt-get install -y ffmpeg - coverage run -m pytest --reruns 3 --reruns-delay 5 tests/e2e/plugins && coverage xml -o /opt/coverage/plugins/coverage.xml - - - name: Save coverage - uses: actions/cache@v3 - with: - path: /opt/coverage/plugins - key: ${{github.sha}}-coverage-plugins + coverage run -m pytest tests/e2e && coverage xml -o /opt/coverage/e2e/coverage.xml codecov-upload: runs-on: ubuntu-22.04 @@ -208,10 +130,7 @@ jobs: test-unit, test-integration, test-integration-prebuilt-presets, - test-soundcloud, - test-bandcamp, - test-youtube, - test-plugins + test-e2e ] permissions: contents: read @@ -226,41 +145,23 @@ jobs: - name: Restore integration test coverage uses: actions/cache@v3 with: - path: /opt/coverage/unit + path: /opt/coverage/integration key: ${{github.sha}}-coverage-integration - name: Restore integration prebuilt presets test coverage uses: actions/cache@v3 with: - path: /opt/coverage/unit + path: /opt/coverage/integration-prebuilt-presets key: ${{github.sha}}-coverage-integration-prebuilt-presets - - name: Restore soundcloud test coverage + - name: Restore e2e test coverage uses: actions/cache@v3 with: - path: /opt/coverage/soundcloud - key: ${{github.sha}}-coverage-soundcloud - - - name: Restore bandcamp test coverage - uses: actions/cache@v3 - with: - path: /opt/coverage/bandcamp - key: ${{github.sha}}-coverage-bandcamp - - - name: Restore youtube test coverage - uses: actions/cache@v3 - with: - path: /opt/coverage/youtube - key: ${{github.sha}}-coverage-youtube - - - name: Restore plugins test coverage - uses: actions/cache@v3 - with: - path: /opt/coverage/plugins - key: ${{github.sha}}-coverage-plugins + path: /opt/coverage/e2e + key: ${{github.sha}}-coverage-e2e - name: Upload code coverage to codecov.io uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - files: /opt/coverage/unit/coverage.xml,/opt/coverage/soundcloud/coverage.xml,/opt/coverage/bandcamp/coverage.xml,/opt/coverage/youtube/coverage.xml,/opt/coverage/plugins/coverage.xml \ No newline at end of file + files: /opt/coverage/unit/coverage.xml,/opt/coverage/integration/coverage.xml,/opt/coverage/integration-prebuilt-presets/coverage.xml,/opt/coverage/e2e/coverage.xml \ No newline at end of file