schedule_tests.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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@v4
  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. pypy:
  36. runs-on: ubuntu-latest
  37. name: Ubuntu, SQLite, PyPy3.10
  38. continue-on-error: true
  39. steps:
  40. - name: Checkout
  41. uses: actions/checkout@v4
  42. - name: Set up Python
  43. uses: actions/setup-python@v4
  44. with:
  45. python-version: pypy-3.10-nightly
  46. cache: 'pip'
  47. cache-dependency-path: 'tests/requirements/py3.txt'
  48. - name: Install libmemcached-dev for pylibmc
  49. run: sudo apt-get install libmemcached-dev
  50. - name: Install and upgrade packaging tools
  51. run: python -m pip install --upgrade pip setuptools wheel
  52. - run: python -m pip install -r tests/requirements/py3.txt -e .
  53. - name: Run tests
  54. run: python tests/runtests.py -v2
  55. javascript-tests:
  56. runs-on: ubuntu-latest
  57. name: JavaScript tests
  58. steps:
  59. - name: Checkout
  60. uses: actions/checkout@v4
  61. - name: Set up Node.js
  62. uses: actions/setup-node@v3
  63. with:
  64. node-version: '20'
  65. cache: 'npm'
  66. cache-dependency-path: '**/package.json'
  67. - run: npm install
  68. - run: npm test
  69. selenium-sqlite:
  70. runs-on: ubuntu-latest
  71. name: Selenium tests, SQLite
  72. steps:
  73. - name: Checkout
  74. uses: actions/checkout@v4
  75. - name: Set up Python
  76. uses: actions/setup-python@v4
  77. with:
  78. python-version: '3.12'
  79. cache: 'pip'
  80. cache-dependency-path: 'tests/requirements/py3.txt'
  81. - name: Install libmemcached-dev for pylibmc
  82. run: sudo apt-get install libmemcached-dev
  83. - name: Install and upgrade packaging tools
  84. run: python -m pip install --upgrade pip setuptools wheel
  85. - run: python -m pip install -r tests/requirements/py3.txt -e .
  86. - name: Run Selenium tests
  87. working-directory: ./tests/
  88. run: |
  89. python -Wall runtests.py --verbosity 2 --noinput --selenium=chrome --headless --settings=test_sqlite --parallel 2
  90. selenium-postgresql:
  91. runs-on: ubuntu-latest
  92. name: Selenium tests, PostgreSQL
  93. services:
  94. postgres:
  95. image: postgres:13-alpine
  96. env:
  97. POSTGRES_DB: django
  98. POSTGRES_USER: user
  99. POSTGRES_PASSWORD: postgres
  100. ports:
  101. - 5432:5432
  102. options: >-
  103. --health-cmd pg_isready
  104. --health-interval 10s
  105. --health-timeout 5s
  106. --health-retries 5
  107. steps:
  108. - name: Checkout
  109. uses: actions/checkout@v4
  110. - name: Set up Python
  111. uses: actions/setup-python@v4
  112. with:
  113. python-version: '3.12'
  114. cache: 'pip'
  115. cache-dependency-path: 'tests/requirements/py3.txt'
  116. - name: Install libmemcached-dev for pylibmc
  117. run: sudo apt-get install libmemcached-dev
  118. - name: Install and upgrade packaging tools
  119. run: python -m pip install --upgrade pip setuptools wheel
  120. - run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e .
  121. - name: Create PostgreSQL settings file
  122. run: mv ./.github/workflows/data/test_postgres.py.tpl ./tests/test_postgres.py
  123. - name: Run Selenium tests
  124. working-directory: ./tests/
  125. run: |
  126. python -Wall runtests.py --verbosity 2 --noinput --selenium=chrome --headless --settings=test_postgres --parallel 2