simplified unix CI, make windows CI
This commit is contained in:
parent
8a3d92b04b
commit
0fdb9e9336
2 changed files with 150 additions and 60 deletions
125
.github/workflows/ci-windows.yaml
vendored
Normal file
125
.github/workflows/ci-windows.yaml
vendored
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
name: ytld-sub CI (Windows)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
test-unit:
|
||||
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 unit tests with coverage
|
||||
run: |
|
||||
curl.exe -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 tests/unit
|
||||
|
||||
test-soundcloud:
|
||||
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 -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 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 -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 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 -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 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 -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 tests/e2e/plugins
|
||||
85
.github/workflows/ci.yaml
vendored
85
.github/workflows/ci.yaml
vendored
|
|
@ -1,4 +1,4 @@
|
|||
name: ytld-sub CI
|
||||
name: ytld-sub CI (Linux)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
|
@ -8,70 +8,42 @@ on:
|
|||
branches:
|
||||
- master
|
||||
jobs:
|
||||
test-build:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.10"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m venv /opt/env
|
||||
source /opt/env/bin/activate
|
||||
pip install -e .[lint,test]
|
||||
- name: Save Python build cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /opt/env
|
||||
key: ${{github.sha}}-env
|
||||
|
||||
test-lint:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: test-build
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Restore Python build cache
|
||||
uses: actions/cache@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
path: /opt/env
|
||||
key: ${{github.sha}}-env
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Run linters
|
||||
run: |
|
||||
source /opt/env/bin/activate
|
||||
pip install -e .[lint]
|
||||
make check_lint
|
||||
|
||||
test-unit:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: test-build
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Restore Python build cache
|
||||
uses: actions/cache@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
path: /opt/env
|
||||
key: ${{github.sha}}-env
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Run unit tests with coverage
|
||||
run: |
|
||||
pip install -e .[test]
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ffmpeg
|
||||
source /opt/env/bin/activate
|
||||
coverage run -m pytest tests/unit && coverage xml -o /opt/coverage/unit/coverage.xml
|
||||
|
||||
- name: Save coverage
|
||||
|
|
@ -82,46 +54,42 @@ jobs:
|
|||
|
||||
test-soundcloud:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: test-build
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Restore Python build cache
|
||||
uses: actions/cache@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
path: /opt/env
|
||||
key: ${{github.sha}}-env
|
||||
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
|
||||
source /opt/env/bin/activate
|
||||
coverage run -m pytest tests/e2e/soundcloud && coverage xml -o /opt/coverage/soundcloud/coverage.xml
|
||||
|
||||
test-bandcamp:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: test-build
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Restore Python build cache
|
||||
uses: actions/cache@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
path: /opt/env
|
||||
key: ${{github.sha}}-env
|
||||
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
|
||||
source /opt/env/bin/activate
|
||||
coverage run -m pytest tests/e2e/bandcamp && coverage xml -o /opt/coverage/bandcamp/coverage.xml
|
||||
|
||||
- name: Save coverage
|
||||
|
|
@ -132,24 +100,22 @@ jobs:
|
|||
|
||||
test-youtube:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: test-build
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Restore Python build cache
|
||||
uses: actions/cache@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
path: /opt/env
|
||||
key: ${{github.sha}}-env
|
||||
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
|
||||
source /opt/env/bin/activate
|
||||
coverage run -m pytest tests/e2e/youtube && coverage xml -o /opt/coverage/youtube/coverage.xml
|
||||
|
||||
- name: Save coverage
|
||||
|
|
@ -167,17 +133,16 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Restore Python build cache
|
||||
uses: actions/cache@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
path: /opt/env
|
||||
key: ${{github.sha}}-env
|
||||
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
|
||||
source /opt/env/bin/activate
|
||||
coverage run -m pytest tests/e2e/plugins && coverage xml -o /opt/coverage/plugins/coverage.xml
|
||||
|
||||
- name: Save coverage
|
||||
|
|
|
|||
Loading…
Reference in a new issue