]> jfr.im git - yt-dlp.git/blame - .github/workflows/core.yml
[ci] Run core tests only for core changes (#8841)
[yt-dlp.git] / .github / workflows / core.yml
CommitLineData
3bcaa37b 1name: Core Tests
13b3cb3c
SS
2on:
3 push:
4 paths:
5 - .github/**
6 - devscripts/**
7 - test/**
8 - yt_dlp/**.py
9 - '!yt_dlp/extractor/*.py'
10 - yt_dlp/extractor/__init__.py
11 - yt_dlp/extractor/common.py
12 - yt_dlp/extractor/extractors.py
13 pull_request:
14 paths:
15 - .github/**
16 - devscripts/**
17 - test/**
18 - yt_dlp/**.py
19 - '!yt_dlp/extractor/*.py'
20 - yt_dlp/extractor/__init__.py
21 - yt_dlp/extractor/common.py
22 - yt_dlp/extractor/extractors.py
c789fb77
A
23permissions:
24 contents: read
25
f124fa45
SS
26concurrency:
27 group: core-${{ github.event.pull_request.number || github.ref }}
28 cancel-in-progress: ${{ github.event_name == 'pull_request' }}
29
c76eb41b 30jobs:
31 tests:
3bcaa37b 32 name: Core Tests
36382262 33 if: "!contains(github.event.head_commit.message, 'ci skip')"
c76eb41b 34 runs-on: ${{ matrix.os }}
35 strategy:
e4bdd337 36 fail-fast: false
c76eb41b 37 matrix:
7a96d0b3 38 os: [ubuntu-latest]
71df9b7f 39 # CPython 3.11 is in quick-test
f4b95aca 40 python-version: ['3.8', '3.9', '3.10', '3.12', pypy-3.8, pypy-3.10]
c76eb41b 41 run-tests-ext: [sh]
42 include:
2cb19820 43 # atleast one of each CPython/PyPy tests must be in windows
c76eb41b 44 - os: windows-latest
f4b95aca 45 python-version: '3.8'
2cb19820 46 run-tests-ext: bat
836e06d2 47 - os: windows-latest
377e85a1 48 python-version: '3.12'
836e06d2 49 run-tests-ext: bat
2cb19820 50 - os: windows-latest
51 python-version: pypy-3.9
c76eb41b 52 run-tests-ext: bat
c76eb41b 53 steps:
5438593a 54 - uses: actions/checkout@v4
c76eb41b 55 - name: Set up Python ${{ matrix.python-version }}
c4b6c5c7 56 uses: actions/setup-python@v4
c76eb41b 57 with:
58 python-version: ${{ matrix.python-version }}
f4b95aca 59 - name: Install test requirements
700444c2 60 run: pip install pytest -r requirements.txt
c76eb41b 61 - name: Run tests
14b17a55 62 continue-on-error: False
71df9b7f 63 run: |
64 python3 -m yt_dlp -v || true # Print debug head
65 ./devscripts/run_tests.${{ matrix.run-tests-ext }} core