2
0

schedule_tests.yml 3.3 KB

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