core.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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.8 is in quick-test
  38. python-version: ['3.9', '3.10', '3.11', '3.12', pypy-3.8, 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.8'
  43. - os: windows-latest
  44. python-version: '3.12'
  45. - os: windows-latest
  46. python-version: pypy-3.9
  47. steps:
  48. - uses: actions/checkout@v4
  49. - name: Set up Python ${{ matrix.python-version }}
  50. uses: actions/setup-python@v5
  51. with:
  52. python-version: ${{ matrix.python-version }}
  53. - name: Install test requirements
  54. run: python3 ./devscripts/install_deps.py --include test --include curl-cffi
  55. - name: Run tests
  56. continue-on-error: False
  57. run: |
  58. python3 -m yt_dlp -v || true # Print debug head
  59. python3 ./devscripts/run_tests.py core