schedule_tests.yml 3.5 KB

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