2
0

schedule_tests.yml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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'
  19. - '3.14-dev'
  20. name: Windows, SQLite, Python ${{ matrix.python-version }}
  21. continue-on-error: true
  22. steps:
  23. - name: Checkout
  24. uses: actions/checkout@v4
  25. - name: Set up Python
  26. uses: actions/setup-python@v5
  27. with:
  28. python-version: ${{ matrix.python-version }}
  29. cache: 'pip'
  30. cache-dependency-path: 'tests/requirements/py3.txt'
  31. - name: Install and upgrade packaging tools
  32. run: python -m pip install --upgrade pip setuptools wheel
  33. - run: python -m pip install -r tests/requirements/py3.txt -e .
  34. - name: Run tests
  35. run: python -Wall tests/runtests.py -v2
  36. pyc-only:
  37. runs-on: ubuntu-latest
  38. name: Byte-compiled Django with no source files (only .pyc files)
  39. steps:
  40. - name: Checkout
  41. uses: actions/checkout@v4
  42. - name: Set up Python
  43. uses: actions/setup-python@v5
  44. with:
  45. python-version: '3.13'
  46. cache: 'pip'
  47. - name: Install libmemcached-dev for pylibmc
  48. run: sudo apt-get install libmemcached-dev
  49. - name: Install and upgrade packaging tools
  50. run: python -m pip install --upgrade pip setuptools wheel
  51. - run: python -m pip install .
  52. - name: Prepare site-packages
  53. run: |
  54. DJANGO_PACKAGE_ROOT=$(python -c 'import site; print(site.getsitepackages()[0])')/django
  55. echo $DJANGO_PACKAGE_ROOT
  56. python -m compileall -b $DJANGO_PACKAGE_ROOT
  57. find $DJANGO_PACKAGE_ROOT -name '*.py' -print -delete
  58. - run: python -m pip install -r tests/requirements/py3.txt
  59. - name: Run tests
  60. run: python -Wall tests/runtests.py --verbosity=2
  61. pypy-sqlite:
  62. runs-on: ubuntu-latest
  63. name: Ubuntu, SQLite, PyPy3.10
  64. continue-on-error: true
  65. steps:
  66. - name: Checkout
  67. uses: actions/checkout@v4
  68. - name: Set up Python
  69. uses: actions/setup-python@v5
  70. with:
  71. python-version: pypy-3.10-nightly
  72. cache: 'pip'
  73. cache-dependency-path: 'tests/requirements/py3.txt'
  74. - name: Install libmemcached-dev for pylibmc
  75. run: sudo apt-get install libmemcached-dev
  76. - name: Install and upgrade packaging tools
  77. run: python -m pip install --upgrade pip setuptools wheel
  78. - run: python -m pip install -r tests/requirements/py3.txt -e .
  79. - name: Run tests
  80. run: python -Wall tests/runtests.py --verbosity=2
  81. pypy-postgresql:
  82. runs-on: ubuntu-latest
  83. name: Ubuntu, PostgreSQL, PyPy3.10
  84. continue-on-error: true
  85. services:
  86. postgres:
  87. image: postgres:14-alpine
  88. env:
  89. POSTGRES_DB: django
  90. POSTGRES_USER: user
  91. POSTGRES_PASSWORD: postgres
  92. ports:
  93. - 5432:5432
  94. options: >-
  95. --health-cmd pg_isready
  96. --health-interval 10s
  97. --health-timeout 5s
  98. --health-retries 5
  99. steps:
  100. - name: Checkout
  101. uses: actions/checkout@v4
  102. - name: Set up Python
  103. uses: actions/setup-python@v5
  104. with:
  105. python-version: pypy-3.10-nightly
  106. cache: 'pip'
  107. cache-dependency-path: 'tests/requirements/py3.txt'
  108. - name: Install libmemcached-dev for pylibmc
  109. run: sudo apt-get install libmemcached-dev
  110. - name: Install and upgrade packaging tools
  111. run: python -m pip install --upgrade pip setuptools wheel
  112. - run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e .
  113. - name: Create PostgreSQL settings file
  114. run: mv ./.github/workflows/data/test_postgres.py.tpl ./tests/test_postgres.py
  115. - name: Run tests
  116. run: python -Wall tests/runtests.py --settings=test_postgres --verbosity=2
  117. javascript-tests:
  118. runs-on: ubuntu-latest
  119. name: JavaScript tests
  120. steps:
  121. - name: Checkout
  122. uses: actions/checkout@v4
  123. - name: Set up Node.js
  124. uses: actions/setup-node@v4
  125. with:
  126. node-version: '20'
  127. cache: 'npm'
  128. cache-dependency-path: '**/package.json'
  129. - run: npm install
  130. - run: npm test
  131. selenium-sqlite:
  132. runs-on: ubuntu-latest
  133. name: Selenium tests, SQLite
  134. steps:
  135. - name: Checkout
  136. uses: actions/checkout@v4
  137. - name: Set up Python
  138. uses: actions/setup-python@v5
  139. with:
  140. python-version: '3.13'
  141. cache: 'pip'
  142. cache-dependency-path: 'tests/requirements/py3.txt'
  143. - name: Install libmemcached-dev for pylibmc
  144. run: sudo apt-get install libmemcached-dev
  145. - name: Install and upgrade packaging tools
  146. run: python -m pip install --upgrade pip setuptools wheel
  147. - run: python -m pip install -r tests/requirements/py3.txt -e .
  148. - name: Run Selenium tests
  149. working-directory: ./tests/
  150. run: |
  151. python -Wall runtests.py --verbosity 2 --noinput --selenium=chrome --headless --settings=test_sqlite --parallel 2
  152. selenium-postgresql:
  153. runs-on: ubuntu-latest
  154. name: Selenium tests, PostgreSQL
  155. services:
  156. postgres:
  157. image: postgres:14-alpine
  158. env:
  159. POSTGRES_DB: django
  160. POSTGRES_USER: user
  161. POSTGRES_PASSWORD: postgres
  162. ports:
  163. - 5432:5432
  164. options: >-
  165. --health-cmd pg_isready
  166. --health-interval 10s
  167. --health-timeout 5s
  168. --health-retries 5
  169. steps:
  170. - name: Checkout
  171. uses: actions/checkout@v4
  172. - name: Set up Python
  173. uses: actions/setup-python@v5
  174. with:
  175. python-version: '3.13'
  176. cache: 'pip'
  177. cache-dependency-path: 'tests/requirements/py3.txt'
  178. - name: Install libmemcached-dev for pylibmc
  179. run: sudo apt-get install libmemcached-dev
  180. - name: Install and upgrade packaging tools
  181. run: python -m pip install --upgrade pip setuptools wheel
  182. - run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e .
  183. - name: Create PostgreSQL settings file
  184. run: mv ./.github/workflows/data/test_postgres.py.tpl ./tests/test_postgres.py
  185. - name: Run Selenium tests
  186. working-directory: ./tests/
  187. run: |
  188. python -Wall runtests.py --verbosity 2 --noinput --selenium=chrome --headless --settings=test_postgres --parallel 2
  189. postgresql:
  190. strategy:
  191. fail-fast: false
  192. matrix:
  193. version: [16, 17]
  194. server_side_bindings: [0, 1]
  195. runs-on: ubuntu-latest
  196. name: PostgreSQL Versions
  197. env:
  198. SERVER_SIDE_BINDING: ${{ matrix.server_side_bindings }}
  199. services:
  200. postgres:
  201. image: postgres:${{ matrix.version }}-alpine
  202. env:
  203. POSTGRES_DB: django
  204. POSTGRES_USER: user
  205. POSTGRES_PASSWORD: postgres
  206. ports:
  207. - 5432:5432
  208. options: >-
  209. --health-cmd pg_isready
  210. --health-interval 10s
  211. --health-timeout 5s
  212. --health-retries 5
  213. steps:
  214. - name: Checkout
  215. uses: actions/checkout@v4
  216. - name: Set up Python
  217. uses: actions/setup-python@v5
  218. with:
  219. python-version: '3.13'
  220. cache: 'pip'
  221. cache-dependency-path: 'tests/requirements/py3.txt'
  222. - name: Install libmemcached-dev for pylibmc
  223. run: sudo apt-get install libmemcached-dev
  224. - name: Install and upgrade packaging tools
  225. run: python -m pip install --upgrade pip setuptools wheel
  226. - run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e .
  227. - name: Create PostgreSQL settings file
  228. run: mv ./.github/workflows/data/test_postgres.py.tpl ./tests/test_postgres.py
  229. - name: Run tests
  230. working-directory: ./tests/
  231. run: python -Wall runtests.py --settings=test_postgres --verbosity=2