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