Release 2024.10.22
[yt-dlp.git] / .github / workflows / core.yml
blob9a4342a585560a72461c5ee74a2f024cdfb9546a
1 name: Core Tests
2 on:
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
23 permissions:
24   contents: read
26 concurrency:
27   group: core-${{ github.event.pull_request.number || github.ref }}
28   cancel-in-progress: ${{ github.event_name == 'pull_request' }}
30 jobs:
31   tests:
32     name: Core Tests
33     if: "!contains(github.event.head_commit.message, 'ci skip')"
34     runs-on: ${{ matrix.os }}
35     strategy:
36       fail-fast: false
37       matrix:
38         os: [ubuntu-latest]
39         # CPython 3.9 is in quick-test
40         python-version: ['3.10', '3.11', '3.12', '3.13', pypy-3.10]
41         include:
42         # atleast one of each CPython/PyPy tests must be in windows
43         - os: windows-latest
44           python-version: '3.9'
45         - os: windows-latest
46           python-version: '3.10'
47         - os: windows-latest
48           python-version: '3.12'
49         - os: windows-latest
50           python-version: '3.13'
51         - os: windows-latest
52           python-version: pypy-3.10
53     steps:
54     - uses: actions/checkout@v4
55     - name: Set up Python ${{ matrix.python-version }}
56       uses: actions/setup-python@v5
57       with:
58         python-version: ${{ matrix.python-version }}
59     - name: Install test requirements
60       run: python3 ./devscripts/install_deps.py --include test --include curl-cffi
61     - name: Run tests
62       timeout-minutes: 15
63       continue-on-error: False
64       run: |
65         python3 -m yt_dlp -v || true  # Print debug head
66         python3 ./devscripts/run_tests.py --pytest-args '--reruns 2 --reruns-delay 3.0' core