schedule_tests.yml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. name: Schedule tests
  2. on:
  3. workflow_dispatch:
  4. concurrency:
  5. group: ${{ github.workflow }}-${{ github.ref }}
  6. cancel-in-progress: true
  7. permissions:
  8. contents: read
  9. jobs:
  10. windows:
  11. runs-on: windows-latest
  12. strategy:
  13. matrix:
  14. python-version:
  15. - '3.10'
  16. - '3.11'
  17. - '3.12'
  18. - '3.13-dev'
  19. name: Windows, SQLite, Python ${{ matrix.python-version }}
  20. continue-on-error: true
  21. steps:
  22. - name: Checkout
  23. uses: actions/checkout@v4
  24. - name: Set up Python
  25. uses: actions/setup-python@v5
  26. with:
  27. python-version: ${{ matrix.python-version }}
  28. cache: 'pip'
  29. cache-dependency-path: 'tests/requirements/py3.txt'
  30. - name: Install and upgrade packaging tools
  31. run: python -m pip install --upgrade pip setuptools wheel
  32. - run: python -m pip install -r tests/requirements/py3.txt -e .
  33. - name: Run tests
  34. run: python tests/runtests.py -v2
  35. pyc-only:
  36. runs-on: ubuntu-latest
  37. name: Byte-compiled Django with no source files (only .pyc files)
  38. steps:
  39. - name: Checkout
  40. uses: actions/checkout@v4
  41. - name: Set up Python
  42. uses: actions/setup-python@v5
  43. with:
  44. python-version: '3.12'
  45. cache: 'pip'
  46. - name: Install libmemcached-dev for pylibmc
  47. run: sudo apt-get install libmemcached-dev
  48. - name: Install and upgrade packaging tools
  49. run: python -m pip install --upgrade pip setuptools wheel
  50. - run: python -m pip install .
  51. - name: Prepare site-packages
  52. run: |
  53. SITE_PACKAGE_ROOT=$(python -c 'import site; print(site.getsitepackages()[0])')
  54. echo $SITE_PACKAGE_ROOT
  55. python -m compileall -b $SITE_PACKAGE_ROOT
  56. find $SITE_PACKAGE_ROOT -name '*.py' -print -delete
  57. - run: python -m pip install -r tests/requirements/py3.txt
  58. - name: Run tests
  59. run: python tests/runtests.py --verbosity=2
  60. pypy-sqlite:
  61. runs-on: ubuntu-latest
  62. name: Ubuntu, SQLite, PyPy3.10
  63. continue-on-error: true
  64. steps:
  65. - name: Checkout
  66. uses: actions/checkout@v4
  67. - name: Set up Python
  68. uses: actions/setup-python@v5
  69. with:
  70. python-version: pypy-3.10-nightly
  71. cache: 'pip'
  72. cache-dependency-path: 'tests/requirements/py3.txt'
  73. - name: Install libmemcached-dev for pylibmc
  74. run: sudo apt-get install libmemcached-dev
  75. - name: Install and upgrade packaging tools
  76. run: python -m pip install --upgrade pip setuptools wheel
  77. - run: python -m pip install -r tests/requirements/py3.txt -e .
  78. - name: Run tests
  79. run: python -Wall tests/runtests.py --verbosity=2
  80. pypy-postgresql:
  81. runs-on: ubuntu-latest
  82. name: Ubuntu, PostgreSQL, PyPy3.10
  83. continue-on-error: true
  84. services:
  85. postgres:
  86. image: postgres:13-alpine
  87. env:
  88. POSTGRES_DB: django
  89. POSTGRES_USER: user
  90. POSTGRES_PASSWORD: postgres
  91. ports:
  92. - 5432:5432
  93. options: >-
  94. --health-cmd pg_isready
  95. --health-interval 10s
  96. --health-timeout 5s
  97. --health-retries 5
  98. steps:
  99. - name: Checkout
  100. uses: actions/checkout@v4
  101. - name: Set up Python
  102. uses: actions/setup-python@v5
  103. with:
  104. python-version: pypy-3.10-nightly
  105. cache: 'pip'
  106. cache-dependency-path: 'tests/requirements/py3.txt'
  107. - name: Install libmemcached-dev for pylibmc
  108. run: sudo apt-get install libmemcached-dev
  109. - name: Install and upgrade packaging tools
  110. run: python -m pip install --upgrade pip setuptools wheel
  111. - run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e .
  112. - name: Create PostgreSQL settings file
  113. run: mv ./.github/workflows/data/test_postgres.py.tpl ./tests/test_postgres.py
  114. - name: Run tests
  115. run: python -Wall tests/runtests.py --settings=test_postgres --verbosity=2
  116. javascript-tests:
  117. runs-on: ubuntu-latest
  118. name: JavaScript tests
  119. steps:
  120. - name: Checkout
  121. uses: actions/checkout@v4
  122. - name: Set up Node.js
  123. uses: actions/setup-node@v4
  124. with:
  125. node-version: '20'
  126. cache: 'npm'
  127. cache-dependency-path: '**/package.json'
  128. - run: npm install
  129. - run: npm test
  130. selenium-sqlite:
  131. runs-on: ubuntu-latest
  132. name: Selenium tests, SQLite
  133. steps:
  134. - name: Checkout
  135. uses: actions/checkout@v4
  136. - name: Set up Python
  137. uses: actions/setup-python@v5
  138. with:
  139. python-version: '3.12'
  140. cache: 'pip'
  141. cache-dependency-path: 'tests/requirements/py3.txt'
  142. - name: Install libmemcached-dev for pylibmc
  143. run: sudo apt-get install libmemcached-dev
  144. - name: Install and upgrade packaging tools
  145. run: python -m pip install --upgrade pip setuptools wheel
  146. - run: python -m pip install -r tests/requirements/py3.txt -e .
  147. - name: Run Selenium tests
  148. working-directory: ./tests/
  149. run: |
  150. python -Wall runtests.py --verbosity 2 --noinput --selenium=chrome --headless --settings=test_sqlite --parallel 2
  151. selenium-postgresql:
  152. runs-on: ubuntu-latest
  153. name: Selenium tests, PostgreSQL
  154. services:
  155. postgres:
  156. image: postgres:13-alpine
  157. env:
  158. POSTGRES_DB: django
  159. POSTGRES_USER: user
  160. POSTGRES_PASSWORD: postgres
  161. ports:
  162. - 5432:5432
  163. options: >-
  164. --health-cmd pg_isready
  165. --health-interval 10s
  166. --health-timeout 5s
  167. --health-retries 5
  168. steps:
  169. - name: Checkout
  170. uses: actions/checkout@v4
  171. - name: Set up Python
  172. uses: actions/setup-python@v5
  173. with:
  174. python-version: '3.12'
  175. cache: 'pip'
  176. cache-dependency-path: 'tests/requirements/py3.txt'
  177. - name: Install libmemcached-dev for pylibmc
  178. run: sudo apt-get install libmemcached-dev
  179. - name: Install and upgrade packaging tools
  180. run: python -m pip install --upgrade pip setuptools wheel
  181. - run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e .
  182. - name: Create PostgreSQL settings file
  183. run: mv ./.github/workflows/data/test_postgres.py.tpl ./tests/test_postgres.py
  184. - name: Run Selenium tests
  185. working-directory: ./tests/
  186. run: |
  187. python -Wall runtests.py --verbosity 2 --noinput --selenium=chrome --headless --settings=test_postgres --parallel 2