core.yml 1.9 KB

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