]> jfr.im git - yt-dlp.git/blob - .github/workflows/core.yml
[ci] Concurrency optimizations (#8614)
[yt-dlp.git] / .github / workflows / core.yml
1 name: Core Tests
2 on: [push, pull_request]
3 permissions:
4 contents: read
5
6 concurrency:
7 group: core-${{ github.event.pull_request.number || github.ref }}
8 cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9
10 jobs:
11 tests:
12 name: Core Tests
13 if: "!contains(github.event.head_commit.message, 'ci skip')"
14 runs-on: ${{ matrix.os }}
15 strategy:
16 fail-fast: false
17 matrix:
18 os: [ubuntu-latest]
19 # CPython 3.11 is in quick-test
20 python-version: ['3.8', '3.9', '3.10', '3.12', pypy-3.8, pypy-3.10]
21 run-tests-ext: [sh]
22 include:
23 # atleast one of each CPython/PyPy tests must be in windows
24 - os: windows-latest
25 python-version: '3.8'
26 run-tests-ext: bat
27 - os: windows-latest
28 python-version: '3.12'
29 run-tests-ext: bat
30 - os: windows-latest
31 python-version: pypy-3.9
32 run-tests-ext: bat
33 steps:
34 - uses: actions/checkout@v4
35 - name: Set up Python ${{ matrix.python-version }}
36 uses: actions/setup-python@v4
37 with:
38 python-version: ${{ matrix.python-version }}
39 - name: Install test requirements
40 run: pip install pytest -r requirements.txt
41 - name: Run tests
42 continue-on-error: False
43 run: |
44 python3 -m yt_dlp -v || true # Print debug head
45 ./devscripts/run_tests.${{ matrix.run-tests-ext }} core